parent
0f86c04af3
commit
dd2b2447d0
|
@ -0,0 +1,26 @@
|
|||
//// [index.js]
|
||||
export const colors = {
|
||||
royalBlue: "#6400e4",
|
||||
};
|
||||
|
||||
export const brandColors = {
|
||||
purple: colors.royalBlue,
|
||||
};
|
||||
|
||||
//// [index.js]
|
||||
export const colors = {
|
||||
royalBlue: "#6400e4",
|
||||
};
|
||||
export const brandColors = {
|
||||
purple: colors.royalBlue,
|
||||
};
|
||||
|
||||
|
||||
//// [index.d.ts]
|
||||
export namespace colors {
|
||||
const royalBlue: string;
|
||||
}
|
||||
export namespace brandColors {
|
||||
import purple = colors.royalBlue;
|
||||
export { purple };
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
=== tests/cases/conformance/jsdoc/declarations/index.js ===
|
||||
export const colors = {
|
||||
>colors : Symbol(colors, Decl(index.js, 0, 12))
|
||||
|
||||
royalBlue: "#6400e4",
|
||||
>royalBlue : Symbol(royalBlue, Decl(index.js, 0, 23))
|
||||
|
||||
};
|
||||
|
||||
export const brandColors = {
|
||||
>brandColors : Symbol(brandColors, Decl(index.js, 4, 12))
|
||||
|
||||
purple: colors.royalBlue,
|
||||
>purple : Symbol(purple, Decl(index.js, 4, 28))
|
||||
>colors.royalBlue : Symbol(royalBlue, Decl(index.js, 0, 23))
|
||||
>colors : Symbol(colors, Decl(index.js, 0, 12))
|
||||
>royalBlue : Symbol(royalBlue, Decl(index.js, 0, 23))
|
||||
|
||||
};
|
|
@ -0,0 +1,22 @@
|
|||
=== tests/cases/conformance/jsdoc/declarations/index.js ===
|
||||
export const colors = {
|
||||
>colors : { royalBlue: string; }
|
||||
>{ royalBlue: "#6400e4",} : { royalBlue: string; }
|
||||
|
||||
royalBlue: "#6400e4",
|
||||
>royalBlue : string
|
||||
>"#6400e4" : "#6400e4"
|
||||
|
||||
};
|
||||
|
||||
export const brandColors = {
|
||||
>brandColors : { purple: string; }
|
||||
>{ purple: colors.royalBlue,} : { purple: string; }
|
||||
|
||||
purple: colors.royalBlue,
|
||||
>purple : string
|
||||
>colors.royalBlue : string
|
||||
>colors : { royalBlue: string; }
|
||||
>royalBlue : string
|
||||
|
||||
};
|
|
@ -0,0 +1,13 @@
|
|||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
// @outDir: ./out
|
||||
// @target: es6
|
||||
// @declaration: true
|
||||
// @filename: index.js
|
||||
export const colors = {
|
||||
royalBlue: "#6400e4",
|
||||
};
|
||||
|
||||
export const brandColors = {
|
||||
purple: colors.royalBlue,
|
||||
};
|
Loading…
Reference in a new issue