-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
589f734
commit a086a3c
Showing
5 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/b.js(6,14): error TS2420: Class 'C' incorrectly implements interface 'I'. | ||
Property 'foo' is missing in type 'C' but required in type 'I'. | ||
|
||
|
||
==== /a.ts (0 errors) ==== | ||
export interface I { | ||
foo(): void; | ||
} | ||
|
||
==== /b.js (1 errors) ==== | ||
/** | ||
* @import * as NS from './a' | ||
*/ | ||
|
||
/** @implements {NS.I} */ | ||
export class C {} | ||
~ | ||
!!! error TS2420: Class 'C' incorrectly implements interface 'I'. | ||
!!! error TS2420: Property 'foo' is missing in type 'C' but required in type 'I'. | ||
!!! related TS2728 /a.ts:2:5: 'foo' is declared here. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//// [tests/cases/conformance/jsdoc/importTag23.ts] //// | ||
|
||
=== /a.ts === | ||
export interface I { | ||
>I : Symbol(I, Decl(a.ts, 0, 0)) | ||
|
||
foo(): void; | ||
>foo : Symbol(I.foo, Decl(a.ts, 0, 20)) | ||
} | ||
|
||
=== /b.js === | ||
/** | ||
* @import * as NS from './a' | ||
*/ | ||
|
||
/** @implements {NS.I} */ | ||
export class C {} | ||
>C : Symbol(C, Decl(b.js, 0, 0)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//// [tests/cases/conformance/jsdoc/importTag23.ts] //// | ||
|
||
=== /a.ts === | ||
export interface I { | ||
foo(): void; | ||
>foo : () => void | ||
> : ^^^^^^ | ||
} | ||
|
||
=== /b.js === | ||
/** | ||
* @import * as NS from './a' | ||
*/ | ||
|
||
/** @implements {NS.I} */ | ||
export class C {} | ||
>C : C | ||
> : ^ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// @checkJs: true | ||
// @allowJs: true | ||
// @noEmit: true | ||
|
||
// @filename: /a.ts | ||
export interface I { | ||
foo(): void; | ||
} | ||
|
||
// @filename: /b.js | ||
/** | ||
* @import * as NS from './a' | ||
*/ | ||
|
||
/** @implements {NS.I} */ | ||
export class C {} |