Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6072235
Generator helpers updated.
DeividasBakanas Dec 28, 2017
54397e8
Parameters and TypeParameters tables moved to GeneratorHelpers.
DeividasBakanas Dec 28, 2017
58d6975
ApiInterfacePlugin implemented.
DeividasBakanas Dec 28, 2017
3319195
ApiCallablePlugin created.
DeividasBakanas Dec 28, 2017
f7e4b00
ApiCallablePlugin added to default plugins.
DeividasBakanas Dec 28, 2017
430ba64
ApiIndexPlugin added.
DeividasBakanas Dec 28, 2017
267e37e
ApiInterfacePlugin renders splitted to plugins.
DeividasBakanas Dec 28, 2017
b164eeb
`Construct` item kind implented.
DeividasBakanas Dec 28, 2017
2f32277
Construct ApiItem implemented in `ApiInterfaceToString`.
DeividasBakanas Dec 28, 2017
6006662
Index signature rendering fixed.
DeividasBakanas Dec 28, 2017
58c94f0
Packages updated.
DeividasBakanas Dec 28, 2017
17059ac
Multiple items render moved to a single method.
DeividasBakanas Dec 28, 2017
2e5553f
Packages updated.
DeividasBakanas Dec 28, 2017
db04b9c
Merge with dev. Conflicts resolved.
DeividasBakanas Dec 29, 2017
50c8392
Interface plugin render strategy improved.
DeividasBakanas Dec 29, 2017
b117454
Generic types fixed in `TypeDtoToMarkdownString`.
DeividasBakanas Dec 29, 2017
bc741d1
TypeParameters rendering fixed in ApiFunctionPlugin.
DeividasBakanas Dec 29, 2017
c3a50da
Example interfaces added.
DeividasBakanas Dec 29, 2017
e7dff44
`simple-project-1` snapshot updated.
DeividasBakanas Dec 29, 2017
28879aa
@simplrjs/markdown version updated.
DeividasBakanas Jan 2, 2018
c3b5d8d
Less than, greater than symbols escaped.
DeividasBakanas Jan 2, 2018
23a48ee
Example updated.
DeividasBakanas Jan 2, 2018
3dc36e1
Snapshot updated.
DeividasBakanas Jan 2, 2018
10ffcaa
Unnecessary comments removed from ApiInterfacePlugin.
DeividasBakanas Jan 2, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
471 changes: 338 additions & 133 deletions common/config/rush/npm-shrinkwrap.json

Large diffs are not rendered by default.

548 changes: 546 additions & 2 deletions packages/ts-docs-gen/examples/simple/docs/api/index.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/ts-docs-gen/examples/simple/docs/api/index/hello.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public GetFoo(arg: string | number): string
```
#### Parameters

| Name | Type |
| ---- | ---------------- |
| arg | string \| number |
| Name | Type |
| ---- | -------------------- |
| arg | string | number |


## Properties
Expand Down
115 changes: 102 additions & 13 deletions packages/ts-docs-gen/examples/simple/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,94 @@
// tslint:disable

export interface ExtendedBar extends Foo<number>, Boo {
OtherStuff: string[];
}

export interface Foo<TType> {
Name: string;
Surname: string;
Type: TType;
}

export interface Boo {
Boos: string[];
}

export interface AnotherInterface {
<TValue>(param1: TValue, param2: TValue): boolean;
}

export interface MyConstraintType {
myProperty: string;
}

export interface MyDefaultType extends MyConstraintType {
anotherProperty: number;
}

export interface ObjectsInterface {
objectOne: Object;
objectTwo: Object;
}

export interface InterfaceWithCall {
<T>(): { someProperty: T };
}

export interface InterfaceWithConstraintType extends Dictionary<string> {
someProperty: string;
}

export interface InterfaceWithMethod<T> {
someMethodOne(): T;
someMethodTwo<TReturn>(): TReturn;
}

export interface Dictionary<TValue> {
new(): Dictionary<TValue>;
[key: string]: TValue;
}

export interface MethodsInterface {
someMethod<T>(): string;
<TValue>(arg: TValue): void;
}

/**
* Monster interface
* @beta
* @deprecated
*/
export interface MonsterInterface<TValue extends Object = {}> extends ObjectsInterface {
new <T>(): MonsterInterface<T>;
new(someParameter: string): string;

readonly [key: string]: TValue;

<T>(): { someProperty: T };
<T>(key?: string): { someProperty: T };
<T>(key: number): { someProperty: T };

readonly objectOne: TValue;
objectTwo: TValue;
}

export interface SomeInterface {
[key: string]: string | number;
[key: number]: string;
}

export interface StringsDictionary {
[key: string]: string;
}

export interface MyInterface {
MyPropertyOne: string;
MyPropertyTwo: Object;
MyPropertyThree: number;
}


// import { Foo } from "./exported-functions";

// export class World { }
Expand Down Expand Up @@ -211,18 +300,18 @@
// }
// }

export class Hello {
/**
* This is a constructor
* @param arg This is an argument ;)
*/
constructor(arg: string) { }
// export class Hello {
// /**
// * This is a constructor
// * @param arg This is an argument ;)
// */
// constructor(arg: string) { }

GetFoo(arg: number): string
GetFoo(arg: string): string
GetFoo(arg: string | number): string {
throw new Error("Method not implemented.");
}
// GetFoo(arg: number): string
// GetFoo(arg: string): string
// GetFoo(arg: string | number): string {
// throw new Error("Method not implemented.");
// }

public Foo: string;
}
// public Foo: string;
// }
4 changes: 2 additions & 2 deletions packages/ts-docs-gen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"engine": "node >= 7.5.0",
"author": "simplrjs <simplr@quatrodev.com> (https://github.com/simplrjs)",
"dependencies": {
"@simplrjs/markdown": "^1.0.3",
"@simplrjs/markdown": "^1.0.7",
"@types/fs-extra": "^5.0.0",
"fast-glob": "^1.0.1",
"fs-extra": "^5.0.0",
"simplr-logger": "^1.0.1",
"ts-extractor": "^3.0.1",
"ts-extractor": "^3.0.3",
"typescript": "^2.6.2"
},
"devDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions packages/ts-docs-gen/src/default-plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { ApiEnumPlugin } from "./plugins/api-enum-plugin";
import { ApiFunctionPlugin } from "./plugins/api-function-plugin";
import { ApiTypePlugin } from "./plugins/api-type-plugin";
import { ApiNamespacePlugin } from "./plugins/api-namespace-plugin";
import { ApiInterfacePlugin } from "./plugins/api-interface-plugin";
import { ApiCallablePlugin } from "./plugins/api-callable-plugin";
import { ApiIndexPlugin } from "./plugins/api-index-plugin";
import { ApiClassPlugin } from "./plugins/api-class-plugin";
import { ApiClassConstructorPlugin } from "./plugins/api-class-constructor-plugin";
import { ApiClassMethodPlugin } from "./plugins/api-class-method-plugin";
Expand All @@ -16,6 +19,9 @@ export const DefaultPlugins = [
new ApiFunctionPlugin(),
new ApiTypePlugin(),
new ApiNamespacePlugin(),
new ApiInterfacePlugin(),
new ApiCallablePlugin(),
new ApiIndexPlugin(),
new ApiClassPlugin(),
new ApiClassConstructorPlugin(),
new ApiClassMethodPlugin(),
Expand Down
Loading