-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Showing
12 changed files
with
123 additions
and
8 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,57 @@ | ||
//// [file.ts] | ||
// @ts-nocheck | ||
|
||
export const a = 1 + {}; // This is an error, ofc, `Operator '+' cannot be applied to types '1' and '{}'`, which will be suppressed by the `nocheck` comment | ||
|
||
export interface Aleph { | ||
q: number; | ||
} | ||
|
||
export class Bet implements Aleph { | ||
q: string = "lol" // And so will this implements error | ||
} | ||
|
||
|
||
//// [file.js] | ||
"use strict"; | ||
// @ts-nocheck | ||
exports.__esModule = true; | ||
exports.a = 1 + {}; // This is an error, ofc, `Operator '+' cannot be applied to types '1' and '{}'`, which will be suppressed by the `nocheck` comment | ||
var Bet = /** @class */ (function () { | ||
function Bet() { | ||
this.q = "lol"; // And so will this implements error | ||
} | ||
return Bet; | ||
}()); | ||
exports.Bet = Bet; | ||
|
||
|
||
//// [file.d.ts] | ||
export declare const a: any; | ||
export interface Aleph { | ||
q: number; | ||
} | ||
export declare class Bet implements Aleph { | ||
q: string; | ||
} | ||
|
||
|
||
//// [DtsFileErrors] | ||
|
||
|
||
tests/cases/conformance/jsdoc/file.d.ts(6,5): error TS2416: Property 'q' in type 'Bet' is not assignable to the same property in base type 'Aleph'. | ||
Type 'string' is not assignable to type 'number'. | ||
|
||
|
||
==== tests/cases/conformance/jsdoc/file.d.ts (1 errors) ==== | ||
export declare const a: any; | ||
export interface Aleph { | ||
q: number; | ||
} | ||
export declare class Bet implements Aleph { | ||
q: string; | ||
~ | ||
!!! error TS2416: Property 'q' in type 'Bet' is not assignable to the same property in base type 'Aleph'. | ||
!!! error TS2416: Type 'string' is not assignable to type 'number'. | ||
} | ||
|
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 @@ | ||
=== tests/cases/conformance/jsdoc/file.ts === | ||
// @ts-nocheck | ||
|
||
export const a = 1 + {}; // This is an error, ofc, `Operator '+' cannot be applied to types '1' and '{}'`, which will be suppressed by the `nocheck` comment | ||
>a : Symbol(a, Decl(file.ts, 2, 12)) | ||
|
||
export interface Aleph { | ||
>Aleph : Symbol(Aleph, Decl(file.ts, 2, 24)) | ||
|
||
q: number; | ||
>q : Symbol(Aleph.q, Decl(file.ts, 4, 24)) | ||
} | ||
|
||
export class Bet implements Aleph { | ||
>Bet : Symbol(Bet, Decl(file.ts, 6, 1)) | ||
>Aleph : Symbol(Aleph, Decl(file.ts, 2, 24)) | ||
|
||
q: string = "lol" // And so will this implements error | ||
>q : Symbol(Bet.q, Decl(file.ts, 8, 35)) | ||
} | ||
|
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,22 @@ | ||
=== tests/cases/conformance/jsdoc/file.ts === | ||
// @ts-nocheck | ||
|
||
export const a = 1 + {}; // This is an error, ofc, `Operator '+' cannot be applied to types '1' and '{}'`, which will be suppressed by the `nocheck` comment | ||
>a : any | ||
>1 + {} : any | ||
>1 : 1 | ||
>{} : {} | ||
|
||
export interface Aleph { | ||
q: number; | ||
>q : number | ||
} | ||
|
||
export class Bet implements Aleph { | ||
>Bet : Bet | ||
|
||
q: string = "lol" // And so will this implements error | ||
>q : string | ||
>"lol" : "lol" | ||
} | ||
|
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,14 @@ | ||
// @declaration: true | ||
// @filename: file.ts | ||
|
||
// @ts-nocheck | ||
|
||
export const a = 1 + {}; // This is an error, ofc, `Operator '+' cannot be applied to types '1' and '{}'`, which will be suppressed by the `nocheck` comment | ||
|
||
export interface Aleph { | ||
q: number; | ||
} | ||
|
||
export class Bet implements Aleph { | ||
q: string = "lol" // And so will this implements error | ||
} |
2 changes: 1 addition & 1 deletion
2
tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter
Submodule TypeScript-Node-Starter
updated
3 files
+1 −1 | .vscode/settings.json | |
+3 −3 | package-lock.json | |
+1 −1 | src/app.ts |
2 changes: 1 addition & 1 deletion
2
tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter
Submodule axios-src
updated
24 files
+4 −2 | .travis.yml | |
+3 −6 | CHANGELOG.md | |
+2 −2 | COOKBOOK.md | |
+10 −21 | ECOSYSTEM.md | |
+3 −3 | README.md | |
+1 −1 | examples/all/index.html | |
+1 −1 | examples/amd/index.html | |
+1 −1 | examples/get/index.html | |
+1 −1 | examples/post/index.html | |
+4 −7 | examples/server.js | |
+1 −1 | examples/transform-response/index.html | |
+1 −1 | examples/upload/index.html | |
+1 −3 | lib/adapters/http.js | |
+2 −4 | lib/adapters/xhr.js | |
+1 −9 | lib/core/Axios.js | |
+0 −20 | lib/core/buildFullPath.js | |
+7 −0 | lib/core/dispatchRequest.js | |
+9 −31 | lib/core/mergeConfig.js | |
+1 −1 | sandbox/client.html | |
+0 −20 | test/specs/core/buildFullPath.spec.js | |
+2 −5 | test/specs/core/mergeConfig.spec.js | |
+0 −13 | test/specs/instance.spec.js | |
+0 −24 | test/specs/requests.spec.js | |
+0 −14 | test/unit/adapters/http.js |
Submodule create-react-app
updated
20 files
Submodule prettier
updated
30 files
Submodule puppeteer
updated
from c2651c to b6b295
Submodule webpack
updated
36 files