mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 06:36:08 +03:00
35 lines
503 B
TypeScript
35 lines
503 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;
|
|
}
|
|
} |