TypeScript/tests/baselines/reference/typedefScope1.js
Anders Hejlsberg a4f9bf0fce
Create type aliases for unresolved type symbols (#45976)
* Create type aliases for unresolved type symbols

* Accept new baselines

* Update fourslash tests

* Unresolved import aliases create tagged unresolved symbols

* Add comments

* Accept new baselines

* Add fourslash tests
2021-09-23 13:21:27 -07:00

39 lines
633 B
TypeScript

//// [typedefScope1.js]
function B1() {
/** @typedef {number} B */
/** @type {B} */
var ok1 = 0;
}
function B2() {
/** @typedef {string} B */
/** @type {B} */
var ok2 = 'hi';
}
/** @type {B} */
var notOK = 0;
//// [typedefScope1.js]
"use strict";
function B1() {
/** @typedef {number} B */
/** @type {B} */
var ok1 = 0;
}
function B2() {
/** @typedef {string} B */
/** @type {B} */
var ok2 = 'hi';
}
/** @type {B} */
var notOK = 0;
//// [typedefScope1.d.ts]
declare function B1(): void;
declare function B2(): void;
/** @type {B} */
declare var notOK: B;