Skip to content

Commit c239253

Browse files
committed
Added comments and removed tslint:disable from definition files
1 parent 26827bd commit c239253

4 files changed

Lines changed: 15 additions & 43 deletions

File tree

‎api-extractor/src/ExternalApiHelper.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,23 @@ import * as fs from 'fs';
55
import Analyzer from './Analyzer';
66
import ApiJsonGenerator from './generators/ApiJsonGenerator';
77

8+
/**
9+
* ExternalApiHelper has the specific use case of generating an API json file from third party definition files.
10+
* This class is invoked by the gulp-core-build-typescript gulpfile, where the external package names are
11+
* hard wired.
12+
* The job of this method is almost the same as the API Exactractor task that is executed on first party packages,
13+
* with the exception that all packages analyzed here are external packages with definition files.
14+
*/
815
export default class ExternalApiHelper {
916

17+
/**
18+
* @param rootDir - the absolute path containing a 'package.json' file and is also a parent of the
19+
* external package file. Ex: build.absolute_build_path.
20+
* @param libFolder - the path to the lib folder relative to the rootDir, this is where
21+
* 'external-api-json/external_package.api.json' file will be written. Ex: 'lib'.
22+
* @param externalPackageFilePath - the path to the '*.d.ts' file of the external package relative to the rootDir.
23+
* Ex: 'resources/external-api-json/es6-promise/index.t.ds'
24+
*/
1025
public static generateApiJson(rootDir: string, libFolder: string, externalPackageFilePath: string): void {
1126
const analyzer: Analyzer = new Analyzer(
1227
(message: string, fileName: string, lineNumber: number): void => {

‎gulp-core-build-typescript/resources/external-api-types/es6-collections/index.d.ts‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
1-
21
// Typings based on DefinitelyTyped definitions from es6-collections@0.5.1
32

4-
/* tslint:disable: interface-name */
5-
/* tslint:disable: no-any */
6-
/* tslint:disable: no-shadowed-variable */
7-
/* tslint:disable: no-var-keyword */
8-
/* tslint:disable: variable-name */
9-
/* tslint:disable: member-ordering */
10-
/* tslint:disable: no-unused-variable */
11-
/* tslint:disable: quotemark */
12-
/* tslint:disable: indent */
13-
/* tslint:disable: max-line-length */
14-
/* tslint:disable: member-access */
15-
/* tslint:disable: whitespace */
16-
173
export interface IteratorResult<T> {
184
done: boolean;
195
value?: T;

‎gulp-core-build-typescript/resources/external-api-types/es6-promise/index.d.ts‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
// Typings based on DefinitelyTyped definitions from es6-promise
22

3-
/* tslint:disable: interface-name */
4-
/* tslint:disable: no-any */
5-
/* tslint:disable: no-shadowed-variable */
6-
/* tslint:disable: no-var-keyword */
7-
/* tslint:disable: variable-name */
8-
/* tslint:disable: member-ordering */
9-
/* tslint:disable: no-unused-variable */
10-
/* tslint:disable: quotemark */
11-
/* tslint:disable: indent */
12-
/* tslint:disable: max-line-length */
13-
/* tslint:disable: member-access */
14-
/* tslint:disable: whitespace */
15-
/* tslint:disable: whitespace */
16-
/* tslint:disable: typedef-whitespace */
17-
/* tslint:disable: export-name */
18-
193
export interface Thenable<T> {
204
then<U>(onFulfilled?: (value: T) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Thenable<U>;
215
then<U>(onFulfilled?: (value: T) => U | Thenable<U>, onRejected?: (error: any) => void): Thenable<U>;

‎gulp-core-build-typescript/resources/external-api-types/whatwg-fetch/index.d.ts‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
// Typings based on DefinitelyTyped definitions from whatwg-fetch
22

3-
/* tslint:disable: interface-name */
4-
/* tslint:disable: no-any */
5-
/* tslint:disable: no-shadowed-variable */
6-
/* tslint:disable: no-var-keyword */
7-
/* tslint:disable: variable-name */
8-
/* tslint:disable: member-ordering */
9-
/* tslint:disable: no-unused-variable */
10-
/* tslint:disable: quotemark */
11-
/* tslint:disable: indent */
12-
/* tslint:disable: max-line-length */
13-
/* tslint:disable: member-access */
14-
/* tslint:disable: whitespace */
15-
163
export class Request extends Body {
174
constructor(input: string|Request, init?:RequestInit);
185
method: string;

0 commit comments

Comments
 (0)