Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
0f26791ee2 | |||
34e65462e2 | |||
f55ac65e20 | |||
474ce92b88 | |||
de95e03699 | |||
1e4adeede6 | |||
ca67505870 | |||
18eabb11af | |||
3572dc6574 | |||
0d815f0414 | |||
d6c361750d | |||
d877aed78b | |||
ac7848a462 | |||
76037fba47 | |||
36a7347a3d | |||
d748505b8a | |||
def1a8add3 | |||
1f75449985 | |||
d2380c2192 | |||
1e3fd5830d | |||
3d9c7bbec7 | |||
884186e429 | |||
dd3fc64dee | |||
45db664a3b |
@ -1,4 +1,10 @@
|
||||
image: hosttoday/ht-docker-node:npmts
|
||||
# gitzone standard
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .yarn/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
|
||||
stages:
|
||||
- test
|
||||
@ -10,6 +16,7 @@ testLEGACY:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test legacy
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
@ -18,6 +25,7 @@ testLTS:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test lts
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
@ -25,6 +33,7 @@ testSTABLE:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test stable
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
@ -47,10 +56,13 @@ trigger:
|
||||
- docker
|
||||
|
||||
pages:
|
||||
image: hosttoday/ht-docker-node:npmpage
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
stage: pages
|
||||
script:
|
||||
- npmci command npmpage --host gitlab
|
||||
- npmci command yarn global add npmpage
|
||||
- npmci command npmpage
|
||||
tags:
|
||||
- docker
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
|
30
README.md
30
README.md
@ -1,15 +1,16 @@
|
||||
# tsclass
|
||||
common classes for TypeScript.
|
||||
common classes for TypeScript
|
||||
|
||||
## Availabililty
|
||||
[](https://www.npmjs.com/package/tsclass)
|
||||
[](https://gitlab.com/tsclass/tsclass)
|
||||
[](https://github.com/tsclass/tsclass)
|
||||
[](https://tsclass.gitlab.io/tsclass/)
|
||||
[](https://www.npmjs.com/package/tsclass)
|
||||
[](https://GitLab.com/tsclass/tsclass)
|
||||
[](https://github.com/tsclass/tsclass)
|
||||
[](https://tsclass.gitlab.io/tsclass/)
|
||||
|
||||
## Status for master
|
||||
[](https://gitlab.com/tsclass/tsclass/commits/master)
|
||||
[](https://gitlab.com/tsclass/tsclass/commits/master)
|
||||
[](https://GitLab.com/tsclass/tsclass/commits/master)
|
||||
[](https://GitLab.com/tsclass/tsclass/commits/master)
|
||||
[](https://www.npmjs.com/package/tsclass)
|
||||
[](https://david-dm.org/tsclass/tsclass)
|
||||
[](https://www.bithound.io/github/tsclass/tsclass/master/dependencies/npm)
|
||||
[](https://www.bithound.io/github/tsclass/tsclass)
|
||||
@ -18,13 +19,15 @@ common classes for TypeScript.
|
||||
[](http://standardjs.com/)
|
||||
|
||||
## Usage
|
||||
tsclass exposes many commonly used objects as classes to inherit (-> extends keyword) from for individual implementations.
|
||||
Use TypeScript for best in class instellisense.
|
||||
|
||||
tsclass exposes many commonly used objects as interface to implement (-> extends keyword) by individual implementations.
|
||||
They come complete with best in class intellisense and are easy to require.
|
||||
|
||||
```javascript
|
||||
import { TscInvoice } from 'tsclass/dist/invoice'
|
||||
import { IInvoice } from 'tsclass'
|
||||
|
||||
class myOwnInvoice extends TscInvoice {
|
||||
class myOwnInvoice implements IInvoice {
|
||||
constructor(){
|
||||
super() // you need to call super() in the constructor
|
||||
}
|
||||
@ -45,3 +48,10 @@ class myOwnInvoice extends TscInvoice {
|
||||
|
||||
|
||||
> The modules in bold letters exist as own modules and can be used seperately
|
||||
|
||||
For further information read the linked docs at the top of this README.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
|
||||
[](https://push.rocks)
|
||||
|
5
dist/article.js
vendored
5
dist/article.js
vendored
@ -1,5 +0,0 @@
|
||||
"use strict";
|
||||
class TscArticle {
|
||||
}
|
||||
exports.TscArticle = TscArticle;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJ0aWNsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2FydGljbGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUVBO0NBb0JDO0FBcEJELGdDQW9CQyJ9
|
5
dist/author.js
vendored
5
dist/author.js
vendored
@ -1,5 +0,0 @@
|
||||
"use strict";
|
||||
class TscAuthor {
|
||||
}
|
||||
exports.TscAuthor = TscAuthor;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvYXV0aG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFHQTtDQXFCQztBQXJCRCw4QkFxQkMifQ==
|
14
dist/business/company.d.ts
vendored
Normal file
14
dist/business/company.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
import { IDate } from '../index';
|
||||
/**
|
||||
* describes a company's lifecycle state
|
||||
*/
|
||||
export declare type TCompanyStatus = 'planed' | 'founding' | 'active' | 'liquidation' | 'closed';
|
||||
/**
|
||||
* describes a company
|
||||
*/
|
||||
export interface ICompany {
|
||||
name: string;
|
||||
foundedDate: IDate;
|
||||
closedDate: IDate;
|
||||
status: TCompanyStatus;
|
||||
}
|
3
dist/business/company.js
vendored
Normal file
3
dist/business/company.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGFueS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2J1c2luZXNzL2NvbXBhbnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
3
dist/business/contact.d.ts
vendored
Normal file
3
dist/business/contact.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export interface IContact {
|
||||
name: string;
|
||||
}
|
3
dist/business/contact.js
vendored
Normal file
3
dist/business/contact.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2J1c2luZXNzL2NvbnRhY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
10
dist/business/invoice.d.ts
vendored
Normal file
10
dist/business/invoice.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
export declare type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded';
|
||||
export interface IInvoiceItem {
|
||||
name: string;
|
||||
unitType: string;
|
||||
quantity: number;
|
||||
vatPercentage: number;
|
||||
}
|
||||
export interface IInvoice {
|
||||
status: TInvoiceStatus;
|
||||
}
|
3
dist/business/invoice.js
vendored
Normal file
3
dist/business/invoice.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52b2ljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2J1c2luZXNzL2ludm9pY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
1
dist/cloud/dns.d.ts
vendored
Normal file
1
dist/cloud/dns.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare type TDnsRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF';
|
3
dist/cloud/dns.js
vendored
Normal file
3
dist/cloud/dns.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvY2xvdWQvZG5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
@ -1,5 +1,5 @@
|
||||
import { TscAuthor } from './author';
|
||||
export declare class TscArticle {
|
||||
import { IAuthor } from '../index';
|
||||
export interface IArticle {
|
||||
/**
|
||||
* the title of an article
|
||||
*/
|
||||
@ -7,7 +7,7 @@ export declare class TscArticle {
|
||||
/**
|
||||
* the Author of an article
|
||||
*/
|
||||
author: TscAuthor;
|
||||
author: IAuthor;
|
||||
/**
|
||||
* the content of an article
|
||||
*/
|
3
dist/content/article.js
vendored
Normal file
3
dist/content/article.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJ0aWNsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2NvbnRlbnQvYXJ0aWNsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
10
dist/author.d.ts → dist/content/author.d.ts
vendored
10
dist/author.d.ts → dist/content/author.d.ts
vendored
@ -1,6 +1,6 @@
|
||||
import { TscDate } from './date';
|
||||
import { TscArticle } from './article';
|
||||
export declare class TscAuthor {
|
||||
import { IDate } from '../index';
|
||||
import { IArticle } from '../index';
|
||||
export interface IAuthor {
|
||||
/**
|
||||
* the first name of an author
|
||||
*/
|
||||
@ -12,9 +12,9 @@ export declare class TscAuthor {
|
||||
/**
|
||||
* the birthday of an author
|
||||
*/
|
||||
birthday: TscDate;
|
||||
birthday: IDate;
|
||||
/**
|
||||
* articles of an author
|
||||
*/
|
||||
articles: TscArticle;
|
||||
articles: IArticle[];
|
||||
}
|
3
dist/content/author.js
vendored
Normal file
3
dist/content/author.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvY29udGVudC9hdXRob3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
7
dist/date.js
vendored
7
dist/date.js
vendored
@ -1,7 +0,0 @@
|
||||
"use strict";
|
||||
class Date {
|
||||
constructor() {
|
||||
}
|
||||
}
|
||||
exports.Date = Date;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2RhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0lBSUk7SUFFQSxDQUFDO0NBQ0o7QUFQRCxvQkFPQyJ9
|
3
dist/date.d.ts → dist/general/date.d.ts
vendored
3
dist/date.d.ts → dist/general/date.d.ts
vendored
@ -1,6 +1,5 @@
|
||||
export declare class Date {
|
||||
export interface IDate {
|
||||
day: number;
|
||||
month: number;
|
||||
year: number;
|
||||
constructor();
|
||||
}
|
3
dist/general/date.js
vendored
Normal file
3
dist/general/date.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2dlbmVyYWwvZGF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
2
dist/general/time.d.ts
vendored
Normal file
2
dist/general/time.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export interface ITime {
|
||||
}
|
3
dist/general/time.js
vendored
Normal file
3
dist/general/time.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2dlbmVyYWwvdGltZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
10
dist/index.d.ts
vendored
10
dist/index.d.ts
vendored
@ -1,2 +1,8 @@
|
||||
export * from "./tsclass.date";
|
||||
export * from "./tsclass.time";
|
||||
export * from './business/company';
|
||||
export * from './business/contact';
|
||||
export * from './business/invoice';
|
||||
export * from './cloud/dns';
|
||||
export * from './content/article';
|
||||
export * from './content/author';
|
||||
export * from './general/date';
|
||||
export * from './general/time';
|
||||
|
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -1,7 +1,3 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
__export(require("./tsclass.date"));
|
||||
__export(require("./tsclass.time"));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsb0NBQStCO0FBQy9CLG9DQUErQiJ9
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
2
dist/invoice.d.ts
vendored
2
dist/invoice.d.ts
vendored
@ -1,2 +0,0 @@
|
||||
export declare class TscInvoice {
|
||||
}
|
5
dist/invoice.js
vendored
5
dist/invoice.js
vendored
@ -1,5 +0,0 @@
|
||||
"use strict";
|
||||
class TscInvoice {
|
||||
}
|
||||
exports.TscInvoice = TscInvoice;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52b2ljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2ludm9pY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0NBRUM7QUFGRCxnQ0FFQyJ9
|
5
dist/time.d.ts
vendored
5
dist/time.d.ts
vendored
@ -1,5 +0,0 @@
|
||||
export declare class Time {
|
||||
constructor();
|
||||
readonly linuxMilliS: number;
|
||||
readonly linuxS: number;
|
||||
}
|
12
dist/time.js
vendored
12
dist/time.js
vendored
@ -1,12 +0,0 @@
|
||||
"use strict";
|
||||
class Time {
|
||||
constructor() { }
|
||||
get linuxMilliS() {
|
||||
return 0;
|
||||
}
|
||||
get linuxS() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
exports.Time = Time;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3RpbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0lBQ0ksZ0JBQWMsQ0FBQztJQUNmLElBQUksV0FBVztRQUNYLE1BQU0sQ0FBQyxDQUFDLENBQUE7SUFDWixDQUFDO0lBRUQsSUFBSSxNQUFNO1FBQ04sTUFBTSxDQUFDLENBQUMsQ0FBQTtJQUNaLENBQUM7Q0FFSjtBQVZELG9CQVVDIn0=
|
0
docs/index.md
Normal file
0
docs/index.md
Normal file
@ -1,46 +0,0 @@
|
||||
0 info it worked if it ends with ok
|
||||
1 verbose cli [ '/Users/philkunz/.nvm/versions/node/v7.0.0/bin/node',
|
||||
1 verbose cli '/Users/philkunz/.nvm/versions/node/v7.0.0/bin/npm',
|
||||
1 verbose cli 'version',
|
||||
1 verbose cli 'patch' ]
|
||||
2 info using npm@3.10.8
|
||||
3 info using node@v7.0.0
|
||||
4 info git [ 'status', '--porcelain' ]
|
||||
5 verbose stack Error: Git working directory not clean.
|
||||
5 verbose stack D dist/tsclass.article.d.ts
|
||||
5 verbose stack D dist/tsclass.article.js
|
||||
5 verbose stack D dist/tsclass.author.d.ts
|
||||
5 verbose stack D dist/tsclass.author.js
|
||||
5 verbose stack D dist/tsclass.date.d.ts
|
||||
5 verbose stack D dist/tsclass.date.js
|
||||
5 verbose stack D dist/tsclass.time.d.ts
|
||||
5 verbose stack D dist/tsclass.time.js
|
||||
5 verbose stack M ts/author.ts
|
||||
5 verbose stack at /Users/philkunz/.nvm/versions/node/v7.0.0/lib/node_modules/npm/lib/version.js:247:19
|
||||
5 verbose stack at /Users/philkunz/.nvm/versions/node/v7.0.0/lib/node_modules/npm/lib/utils/no-progress-while-running.js:21:8
|
||||
5 verbose stack at ChildProcess.exithandler (child_process.js:202:7)
|
||||
5 verbose stack at emitTwo (events.js:106:13)
|
||||
5 verbose stack at ChildProcess.emit (events.js:191:7)
|
||||
5 verbose stack at maybeClose (internal/child_process.js:877:16)
|
||||
5 verbose stack at Socket.<anonymous> (internal/child_process.js:334:11)
|
||||
5 verbose stack at emitOne (events.js:96:13)
|
||||
5 verbose stack at Socket.emit (events.js:188:7)
|
||||
5 verbose stack at Pipe._handle.close [as _onclose] (net.js:501:12)
|
||||
6 verbose cwd /Users/philkunz/gitlab/tsclass/tsclass
|
||||
7 error Darwin 16.1.0
|
||||
8 error argv "/Users/philkunz/.nvm/versions/node/v7.0.0/bin/node" "/Users/philkunz/.nvm/versions/node/v7.0.0/bin/npm" "version" "patch"
|
||||
9 error node v7.0.0
|
||||
10 error npm v3.10.8
|
||||
11 error Git working directory not clean.
|
||||
11 error D dist/tsclass.article.d.ts
|
||||
11 error D dist/tsclass.article.js
|
||||
11 error D dist/tsclass.author.d.ts
|
||||
11 error D dist/tsclass.author.js
|
||||
11 error D dist/tsclass.date.d.ts
|
||||
11 error D dist/tsclass.date.js
|
||||
11 error D dist/tsclass.time.d.ts
|
||||
11 error D dist/tsclass.time.js
|
||||
11 error M ts/author.ts
|
||||
12 error If you need help, you may report this error at:
|
||||
12 error <https://github.com/npm/npm/issues>
|
||||
13 verbose exit [ 1, true ]
|
7
npmextra.json
Normal file
7
npmextra.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"npmci": {
|
||||
"globalNpmTools": [
|
||||
"npmts"
|
||||
]
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "tsclass",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.13",
|
||||
"description": "common classes for TypeScript",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"test": "(npmts)"
|
||||
"test": "(npmts --notest)"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -20,8 +20,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/tsclass/tsclass/issues"
|
||||
},
|
||||
"homepage": "https://github.com/tsclass/tsclass#readme",
|
||||
"devDependencies": {
|
||||
"npmts": "^5.1.5"
|
||||
}
|
||||
"homepage": "https://github.com/tsclass/tsclass#readme"
|
||||
}
|
||||
|
@ -1,23 +0,0 @@
|
||||
import { TscAuthor } from './author'
|
||||
|
||||
export class TscArticle {
|
||||
/**
|
||||
* the title of an article
|
||||
*/
|
||||
title: string
|
||||
|
||||
/**
|
||||
* the Author of an article
|
||||
*/
|
||||
author: TscAuthor
|
||||
|
||||
/**
|
||||
* the content of an article
|
||||
*/
|
||||
content: string
|
||||
|
||||
/**
|
||||
* the tags of an article
|
||||
*/
|
||||
tags: string[]
|
||||
}
|
25
ts/author.ts
25
ts/author.ts
@ -1,25 +0,0 @@
|
||||
import { TscDate } from './date'
|
||||
import { TscArticle } from './article'
|
||||
|
||||
export class TscAuthor {
|
||||
|
||||
/**
|
||||
* the first name of an author
|
||||
*/
|
||||
firstName: string
|
||||
|
||||
/**
|
||||
* the surname of an author
|
||||
*/
|
||||
surName: string
|
||||
|
||||
/**
|
||||
* the birthday of an author
|
||||
*/
|
||||
birthday: TscDate
|
||||
|
||||
/**
|
||||
* articles of an author
|
||||
*/
|
||||
articles: TscArticle
|
||||
}
|
17
ts/business/company.ts
Normal file
17
ts/business/company.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { IContact } from '../index'
|
||||
import { IDate } from '../index'
|
||||
|
||||
/**
|
||||
* describes a company's lifecycle state
|
||||
*/
|
||||
export type TCompanyStatus = 'planed' | 'founding' | 'active' | 'liquidation' | 'closed'
|
||||
|
||||
/**
|
||||
* describes a company
|
||||
*/
|
||||
export interface ICompany {
|
||||
name: string
|
||||
foundedDate: IDate
|
||||
closedDate: IDate
|
||||
status: TCompanyStatus
|
||||
}
|
4
ts/business/contact.ts
Normal file
4
ts/business/contact.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface IContact {
|
||||
name: string
|
||||
|
||||
}
|
14
ts/business/invoice.ts
Normal file
14
ts/business/invoice.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { IContact } from '../index'
|
||||
|
||||
export type TInvoiceStatus = 'draft' | 'invoice' | 'paid' | 'refunded'
|
||||
|
||||
export interface IInvoiceItem {
|
||||
name: string
|
||||
unitType: string
|
||||
quantity: number
|
||||
vatPercentage: number
|
||||
}
|
||||
|
||||
export interface IInvoice {
|
||||
status: TInvoiceStatus
|
||||
}
|
1
ts/cloud/dns.ts
Normal file
1
ts/cloud/dns.ts
Normal file
@ -0,0 +1 @@
|
||||
export type TDnsRecord = 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'SRV' | 'LOC' | 'MX' | 'NS' | 'SPF'
|
23
ts/content/article.ts
Normal file
23
ts/content/article.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import { IAuthor } from '../index'
|
||||
|
||||
export interface IArticle {
|
||||
/**
|
||||
* the title of an article
|
||||
*/
|
||||
title: string
|
||||
|
||||
/**
|
||||
* the Author of an article
|
||||
*/
|
||||
author: IAuthor
|
||||
|
||||
/**
|
||||
* the content of an article
|
||||
*/
|
||||
content: string
|
||||
|
||||
/**
|
||||
* the tags of an article
|
||||
*/
|
||||
tags: string[]
|
||||
}
|
25
ts/content/author.ts
Normal file
25
ts/content/author.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { IDate } from '../index'
|
||||
import { IArticle } from '../index'
|
||||
|
||||
export interface IAuthor {
|
||||
|
||||
/**
|
||||
* the first name of an author
|
||||
*/
|
||||
firstName: string
|
||||
|
||||
/**
|
||||
* the surname of an author
|
||||
*/
|
||||
surName: string
|
||||
|
||||
/**
|
||||
* the birthday of an author
|
||||
*/
|
||||
birthday: IDate
|
||||
|
||||
/**
|
||||
* articles of an author
|
||||
*/
|
||||
articles: IArticle[]
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
export class Date {
|
||||
day: number
|
||||
month: number
|
||||
year: number
|
||||
constructor(){
|
||||
|
||||
}
|
||||
}
|
5
ts/general/date.ts
Normal file
5
ts/general/date.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export interface IDate {
|
||||
day: number
|
||||
month: number
|
||||
year: number
|
||||
}
|
3
ts/general/time.ts
Normal file
3
ts/general/time.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export interface ITime {
|
||||
|
||||
}
|
17
ts/index.ts
17
ts/index.ts
@ -1,2 +1,15 @@
|
||||
export * from "./tsclass.date";
|
||||
export * from "./tsclass.time";
|
||||
// Business
|
||||
export * from './business/company'
|
||||
export * from './business/contact'
|
||||
export * from './business/invoice'
|
||||
|
||||
// Cloud
|
||||
export * from './cloud/dns'
|
||||
|
||||
// Content
|
||||
export * from './content/article'
|
||||
export * from './content/author'
|
||||
|
||||
// General
|
||||
export * from './general/date'
|
||||
export * from './general/time'
|
||||
|
@ -1,3 +0,0 @@
|
||||
export class TscInvoice {
|
||||
|
||||
}
|
11
ts/time.ts
11
ts/time.ts
@ -1,11 +0,0 @@
|
||||
export class Time {
|
||||
constructor(){}
|
||||
get linuxMilliS():number {
|
||||
return 0
|
||||
}
|
||||
|
||||
get linuxS():number {
|
||||
return 0
|
||||
}
|
||||
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"version": false,
|
||||
"dependencies": {},
|
||||
"ambientDependencies": {
|
||||
"colors": "registry:dt/colors#0.6.0-1+20160501135139",
|
||||
"node": "registry:dt/node#4.0.0+20160501135006"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user