Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Commit 0c2f453

Browse files
author
Martynas Žilinskas
authored
Merge pull request #31 from SimplrJS/dev
Version: 0.1.0
2 parents e418574 + 9eea5ab commit 0c2f453

File tree

104 files changed

+1589
-575
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+1589
-575
lines changed

.npmignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@ node_js:
1212
- "node"
1313
script:
1414
- npm test
15+
deploy:
16+
provider: npm
17+
email: dovydas@quatrodev.com
18+
api_key: $SIMPLR_NPM_API_KEY
19+
skip_cleanup: true
20+
on:
21+
tags: true
22+
repo: SimplrJS/ts-extractor

@types/read-package-json/index.d.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

@types/read-package-json/package-json.d.ts

Lines changed: 0 additions & 246 deletions
This file was deleted.

@types/read-package-json/package.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/simple/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
// return "bar";
1111
// }
1212

13-
export * from "./exported-functions";
14-
// export { Kintamasis, Kintamasis2 } from "./exported-const-variables";
13+
// export * from "./exported-functions";
14+
export { Kintamasis as Pakeistas } from "./exported-const-variables";
1515
// export type A<TValue> = number & { ok(): TValue };
1616

1717
// Two types have a one common field

package.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@simplrjs/ts-extractor",
3-
"version": "1.0.0",
2+
"name": "ts-extractor",
3+
"version": "0.1.0",
44
"description": "",
55
"main": "index.js",
66
"repository": {
@@ -13,7 +13,8 @@
1313
"test-watch": "start npm run build-tests -- --watchAll && jest --watchAll",
1414
"build": "tsc -p .",
1515
"build-watch": "npm run build -- -w",
16-
"build-tests": "cd tests && ts-node ./build-tests.ts -p ./"
16+
"build-tests": "cd tests && ts-node ./build-tests.ts -p ./",
17+
"prepublishOnly": "npm run build && rimraf dist/debug.*"
1718
},
1819
"author": "SimplrJS <simplr@quatrodev.com> (https://github.com/simplrjs)",
1920
"contributors": [
@@ -26,6 +27,7 @@
2627
"@types/fs-extra": "^4.0.2",
2728
"fs-extra": "^4.0.2",
2829
"read-package-json": "^2.0.10",
30+
"simplr-logger": "^0.1.1",
2931
"tslint": "^5.8.0",
3032
"typescript": "^2.6.1"
3133
},
@@ -35,10 +37,17 @@
3537
"@types/sinon": "^2.3.3",
3638
"globby": "^6.1.0",
3739
"jest": "^20.0.4",
40+
"rimraf": "^2.6.2",
3841
"sinon": "^2.4.1",
3942
"ts-jest": "^20.0.7",
4043
"ts-node": "^3.3.0"
4144
},
45+
"files": [
46+
"dist",
47+
"**/*.md",
48+
"@types",
49+
"!/examples"
50+
],
4251
"jest": {
4352
"transform": {
4453
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"

src/abstractions/api-callable-base.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,36 @@ import { ApiItemReferenceDictionary } from "../contracts/api-item-reference-dict
88
import { ApiItemKinds } from "../contracts/api-item-kinds";
99
import { TypeDto } from "../contracts/type-dto";
1010
import { ApiMetadataDto } from "../contracts/api-metadata-dto";
11+
import { ApiCallableDto } from "../contracts/api-callable-dto";
1112

1213
/**
1314
* A callable api item base.
1415
*/
1516
export abstract class ApiCallableBase<
1617
TDeclaration extends ts.SignatureDeclaration,
17-
TExtractDto extends ApiFunctionDto
18+
TExtractDto extends ApiCallableDto
1819
>
1920
extends ApiItem<TDeclaration, TExtractDto> {
2021

21-
protected parameters: ApiItemReferenceDictionary = {};
22-
protected typeParameters: ApiItemReferenceDictionary = {};
23-
protected returnType: TypeDto | undefined;
22+
protected Parameters: ApiItemReferenceDictionary = {};
23+
protected TypeParameters: ApiItemReferenceDictionary = {};
24+
protected ReturnType: TypeDto | undefined;
2425

2526
protected OnGatherData(): void {
2627
// Parameters
27-
this.parameters = ApiHelpers.GetItemsIdsFromDeclarations(this.Declaration.parameters, this.Options);
28+
this.Parameters = ApiHelpers.GetItemsIdsFromDeclarations(this.Declaration.parameters, this.Options);
2829

2930
// TypeParameters
3031
if (this.Declaration.typeParameters != null) {
31-
this.typeParameters = ApiHelpers.GetItemsIdsFromDeclarations(this.Declaration.typeParameters, this.Options);
32+
this.TypeParameters = ApiHelpers.GetItemsIdsFromDeclarations(this.Declaration.typeParameters, this.Options);
3233
}
3334

3435
// ReturnType
3536
const signature = this.TypeChecker.getSignatureFromDeclaration(this.Declaration);
3637
if (signature != null) {
3738
const type = this.TypeChecker.getReturnTypeOfSignature(signature);
3839

39-
this.returnType = ApiHelpers.TypeToApiTypeDto(type, this.Options);
40+
this.ReturnType = ApiHelpers.TypeToApiTypeDto(type, this.Options);
4041
}
4142
}
4243
}

0 commit comments

Comments
 (0)