Logo
Explore Help
Sign In
honeymoose/angular-cn
1
0
Fork 0
You've already forked angular-cn
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
angular-cn/aio/tools/transforms/angular-api-package/mocks/methodParameters.ts

21 lines
557 B
TypeScript
Raw Normal View History

build(docs-infra): correctly handle "pseudo" classes (#36989) In the code base there are cases where there is, conceptually, a class that is represented by a combination of an `interface` (type declaration) and a `const` (value declaration). For example: ``` export interface SomeClass { count(a?: string): number; } export const: SomeClass = class { someMethod(a: string = ''): number { ... } }; ``` These were being rendered as interfaces and also not correctly showing the descriptions and default parameter values. In this commit such concepts are now rendered as classes. The classes that are affected by this are: * `DebugElement` * `DebugNode` * `Type` * `EventEmitter` * `TestBed` Note that while decorators are also defined in this form they have their own rendering type (`decorator`) and so are not affecte by this. PR Close #36989
2020-05-13 17:01:10 +01:00
export class TestClass {
method1(
/** description of param1 */ param1: number,
/** description of param2 */ param2?: string,
/** description of param3 */ param3: object = {},
/** description of param4 */ param4 = 'default string',
) {
///
}
/**
* Some description of method 2
* @param param5 description of param5
* @param param6 description of param6
* @param param7 description of param7
*/
method2(param5: string, param6: number, param7 = 42) {
//
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 186ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API