-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
254 additions
and
13 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,86 @@ | ||
=== tests/cases/compiler/usage.js === | ||
const { Thing, useThing, cbThing } = require("./index"); | ||
>Thing : Symbol(Thing, Decl(usage.js, 0, 7)) | ||
>useThing : Symbol(useThing, Decl(usage.js, 0, 14)) | ||
>cbThing : Symbol(cbThing, Decl(usage.js, 0, 24)) | ||
>require : Symbol(require) | ||
>"./index" : Symbol("tests/cases/compiler/index", Decl(index.js, 0, 0)) | ||
|
||
useThing(Thing.a); | ||
>useThing : Symbol(useThing, Decl(usage.js, 0, 14)) | ||
>Thing : Symbol(Thing, Decl(usage.js, 0, 7)) | ||
|
||
/** | ||
* @typedef {Object} LogEntry | ||
* @property {string} type | ||
* @property {number} time | ||
*/ | ||
|
||
cbThing(type => { | ||
>cbThing : Symbol(cbThing, Decl(usage.js, 0, 24)) | ||
>type : Symbol(type, Decl(usage.js, 10, 8)) | ||
|
||
/** @type {LogEntry} */ | ||
const logEntry = { | ||
>logEntry : Symbol(logEntry, Decl(usage.js, 12, 9)) | ||
|
||
time: Date.now(), | ||
>time : Symbol(time, Decl(usage.js, 12, 22)) | ||
>Date.now : Symbol(DateConstructor.now, Decl(lib.es5.d.ts, --, --)) | ||
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) | ||
>now : Symbol(DateConstructor.now, Decl(lib.es5.d.ts, --, --)) | ||
|
||
type, | ||
>type : Symbol(type, Decl(usage.js, 13, 25)) | ||
|
||
}; | ||
}); | ||
|
||
=== tests/cases/compiler/index.js === | ||
/** @enum {string} */ | ||
const Thing = Object.freeze({ | ||
>Thing : Symbol(Thing, Decl(index.js, 1, 5), Decl(index.js, 0, 4)) | ||
>Object.freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) | ||
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) | ||
>freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) | ||
|
||
a: "thing", | ||
>a : Symbol(a, Decl(index.js, 1, 29)) | ||
|
||
b: "chill" | ||
>b : Symbol(b, Decl(index.js, 2, 15)) | ||
|
||
}); | ||
|
||
exports.Thing = Thing; | ||
>exports.Thing : Symbol(Thing, Decl(index.js, 4, 3), Decl(index.js, 0, 4)) | ||
>exports : Symbol(Thing, Decl(index.js, 4, 3), Decl(index.js, 0, 4)) | ||
>Thing : Symbol(Thing, Decl(index.js, 4, 3), Decl(index.js, 0, 4)) | ||
>Thing : Symbol(Thing, Decl(index.js, 1, 5), Decl(index.js, 0, 4)) | ||
|
||
/** | ||
* @param {Thing} x | ||
*/ | ||
function useThing(x) {} | ||
>useThing : Symbol(useThing, Decl(index.js, 6, 22)) | ||
>x : Symbol(x, Decl(index.js, 11, 18)) | ||
|
||
exports.useThing = useThing; | ||
>exports.useThing : Symbol(useThing, Decl(index.js, 11, 23)) | ||
>exports : Symbol(useThing, Decl(index.js, 11, 23)) | ||
>useThing : Symbol(useThing, Decl(index.js, 11, 23)) | ||
>useThing : Symbol(useThing, Decl(index.js, 6, 22)) | ||
|
||
/** | ||
* @param {(x: Thing) => void} x | ||
*/ | ||
function cbThing(x) {} | ||
>cbThing : Symbol(cbThing, Decl(index.js, 13, 28)) | ||
>x : Symbol(x, Decl(index.js, 18, 17)) | ||
|
||
exports.cbThing = cbThing; | ||
>exports.cbThing : Symbol(cbThing, Decl(index.js, 18, 22)) | ||
>exports : Symbol(cbThing, Decl(index.js, 18, 22)) | ||
>cbThing : Symbol(cbThing, Decl(index.js, 18, 22)) | ||
>cbThing : Symbol(cbThing, Decl(index.js, 13, 28)) | ||
|
101 changes: 101 additions & 0 deletions
101
tests/baselines/reference/jsEnumTagOnObjectFrozen.types
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,101 @@ | ||
=== tests/cases/compiler/usage.js === | ||
const { Thing, useThing, cbThing } = require("./index"); | ||
>Thing : any | ||
>useThing : (x: string) => void | ||
>cbThing : (x: (x: string) => void) => void | ||
>require("./index") : typeof import("tests/cases/compiler/index") | ||
>require : any | ||
>"./index" : "./index" | ||
|
||
useThing(Thing.a); | ||
>useThing(Thing.a) : void | ||
>useThing : (x: string) => void | ||
>Thing.a : error | ||
>Thing : any | ||
>a : any | ||
|
||
/** | ||
* @typedef {Object} LogEntry | ||
* @property {string} type | ||
* @property {number} time | ||
*/ | ||
|
||
cbThing(type => { | ||
>cbThing(type => { /** @type {LogEntry} */ const logEntry = { time: Date.now(), type, };}) : void | ||
>cbThing : (x: (x: string) => void) => void | ||
>type => { /** @type {LogEntry} */ const logEntry = { time: Date.now(), type, };} : (type: string) => void | ||
>type : string | ||
|
||
/** @type {LogEntry} */ | ||
const logEntry = { | ||
>logEntry : LogEntry | ||
>{ time: Date.now(), type, } : { time: number; type: string; } | ||
|
||
time: Date.now(), | ||
>time : number | ||
>Date.now() : number | ||
>Date.now : () => number | ||
>Date : DateConstructor | ||
>now : () => number | ||
|
||
type, | ||
>type : string | ||
|
||
}; | ||
}); | ||
|
||
=== tests/cases/compiler/index.js === | ||
/** @enum {string} */ | ||
const Thing = Object.freeze({ | ||
>Thing : Readonly<{ a: string; b: string; }> | ||
>Object.freeze({ a: "thing", b: "chill"}) : Readonly<{ a: string; b: string; }> | ||
>Object.freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>; } | ||
>Object : ObjectConstructor | ||
>freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T>(o: T): Readonly<T>; } | ||
>{ a: "thing", b: "chill"} : { a: string; b: string; } | ||
|
||
a: "thing", | ||
>a : string | ||
>"thing" : "thing" | ||
|
||
b: "chill" | ||
>b : string | ||
>"chill" : "chill" | ||
|
||
}); | ||
|
||
exports.Thing = Thing; | ||
>exports.Thing = Thing : Readonly<{ a: string; b: string; }> | ||
>exports.Thing : error | ||
>exports : typeof import("tests/cases/compiler/index") | ||
>Thing : any | ||
>Thing : Readonly<{ a: string; b: string; }> | ||
|
||
/** | ||
* @param {Thing} x | ||
*/ | ||
function useThing(x) {} | ||
>useThing : (x: string) => void | ||
>x : string | ||
|
||
exports.useThing = useThing; | ||
>exports.useThing = useThing : (x: string) => void | ||
>exports.useThing : (x: string) => void | ||
>exports : typeof import("tests/cases/compiler/index") | ||
>useThing : (x: string) => void | ||
>useThing : (x: string) => void | ||
|
||
/** | ||
* @param {(x: Thing) => void} x | ||
*/ | ||
function cbThing(x) {} | ||
>cbThing : (x: (x: string) => void) => void | ||
>x : (x: string) => void | ||
|
||
exports.cbThing = cbThing; | ||
>exports.cbThing = cbThing : (x: (x: string) => void) => void | ||
>exports.cbThing : (x: (x: string) => void) => void | ||
>exports : typeof import("tests/cases/compiler/index") | ||
>cbThing : (x: (x: string) => void) => void | ||
>cbThing : (x: (x: string) => void) => void | ||
|
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,45 @@ | ||
// @noEmit: true | ||
// @checkJs: true | ||
// @allowJs: true | ||
// @filename: index.js | ||
/** @enum {string} */ | ||
const Thing = Object.freeze({ | ||
a: "thing", | ||
b: "chill" | ||
}); | ||
|
||
exports.Thing = Thing; | ||
|
||
/** | ||
* @param {Thing} x | ||
*/ | ||
function useThing(x) {} | ||
|
||
exports.useThing = useThing; | ||
|
||
/** | ||
* @param {(x: Thing) => void} x | ||
*/ | ||
function cbThing(x) {} | ||
|
||
exports.cbThing = cbThing; | ||
|
||
// @filename: usage.js | ||
|
||
const { Thing, useThing, cbThing } = require("./index"); | ||
|
||
useThing(Thing.a); | ||
|
||
/** | ||
* @typedef {Object} LogEntry | ||
* @property {string} type | ||
* @property {number} time | ||
*/ | ||
|
||
cbThing(type => { | ||
/** @type {LogEntry} */ | ||
const logEntry = { | ||
time: Date.now(), | ||
type, | ||
}; | ||
}); |
2 changes: 1 addition & 1 deletion
2
tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter
Submodule TypeScript-Node-Starter
updated
172 files
2 changes: 1 addition & 1 deletion
2
tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter
2 changes: 1 addition & 1 deletion
2
tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter
Submodule TypeScript-Vue-Starter
updated
6 files
+2 −1 | .gitignore | |
+38 −3 | README.md | |
+30 −1 | package.json | |
+16 −0 | src/components/Hello.spec.ts | |
+2 −0 | tsconfig.json | |
+3,694 −761 | yarn.lock |
Submodule axios-src
updated
11 files
+35 −0 | CHANGELOG.md | |
+2 −0 | ECOSYSTEM.md | |
+15 −6 | README.md | |
+1 −1 | bower.json | |
+9 −1 | dist/axios.js | |
+1 −1 | dist/axios.map | |
+2 −2 | dist/axios.min.js | |
+1 −1 | dist/axios.min.map | |
+2 −2 | index.d.ts | |
+2 −1 | lib/adapters/http.js | |
+1 −1 | package.json |
Submodule create-react-app
updated
131 files
Submodule puppeteer
updated
from 2c6df6 to b6b295