a21ac11582
* In JSDoc, resolve import types as values too This is something that we probably should have been doing for some time. Fixes #26049 * Fix whitespace lint
24 lines
442 B
TypeScript
24 lines
442 B
TypeScript
// @allowJs: true
|
|
// @checkJs: true
|
|
// @noEmit: true
|
|
// @Filename: type.js
|
|
/** @typedef {import("./mod1").TestEnum} TE */
|
|
/** @type {TE} */
|
|
const test = 'add'
|
|
/** @type {import("./mod1").TestEnum} */
|
|
const tost = 'remove'
|
|
|
|
// @Filename: value.js
|
|
import { TestEnum } from "./mod1"
|
|
/** @type {TestEnum} */
|
|
const tist = TestEnum.ADD
|
|
|
|
|
|
// @Filename: mod1.js
|
|
|
|
/** @enum {string} */
|
|
export const TestEnum = {
|
|
ADD: 'add',
|
|
REMOVE: 'remove'
|
|
}
|