f883bf3acb
* Adding support for @implements. * Fixed code review issues for @implements, added some more tests. * Fixed declaration emit for @interface * Improved getImplementsTypes to not cache the results since it is only used once. * Removed unnecessary checks from getImplementsTypes
35 lines
537 B
TypeScript
35 lines
537 B
TypeScript
// @allowJs: true
|
|
// @checkJs: true
|
|
// @declaration: true
|
|
// @emitDeclarationOnly: true
|
|
// @outDir: ./out
|
|
|
|
// @Filename: /defs.d.ts
|
|
interface Drawable {
|
|
draw(): number;
|
|
}
|
|
interface Sizable {
|
|
size(): number;
|
|
}
|
|
// @Filename: /a.js
|
|
/**
|
|
* @implements {Drawable}
|
|
* @implements Sizable
|
|
**/
|
|
class Square {
|
|
draw() {
|
|
return 0;
|
|
}
|
|
size() {
|
|
return 0;
|
|
}
|
|
}
|
|
/**
|
|
* @implements Drawable
|
|
* @implements {Sizable}
|
|
**/
|
|
class BadSquare {
|
|
size() {
|
|
return 0;
|
|
}
|
|
} |