TypeScript/tests/baselines/reference/callbackCrossModule.types
2018-05-17 14:07:49 -07:00

47 lines
974 B
Text

=== tests/cases/conformance/jsdoc/mod1.js ===
/** @callback Con - some kind of continuation
* @param {object | undefined} error
* @return {any} I don't even know what this should return
*/
module.exports = C
>module.exports = C : typeof C
>module.exports : any
>module : any
>exports : any
>C : typeof C
function C() {
>C : typeof C
this.p = 1
>this.p = 1 : 1
>this.p : any
>this : any
>p : any
>1 : 1
}
=== tests/cases/conformance/jsdoc/use.js ===
/** @param {import('./mod1').Con} k */
function f(k) {
>f : (k: import("tests/cases/conformance/jsdoc/mod1").Con) => any
>k : import("tests/cases/conformance/jsdoc/mod1").Con
if (1 === 2 - 1) {
>1 === 2 - 1 : boolean
>1 : 1
>2 - 1 : number
>2 : 2
>1 : 1
// I guess basic math works!
}
return k({ ok: true})
>k({ ok: true}) : any
>k : import("tests/cases/conformance/jsdoc/mod1").Con
>{ ok: true} : { ok: boolean; }
>ok : boolean
>true : true
}