* Do visibility painting from collectLinkedAliases in checker to remove statefullness in declaration emit * Fix #17085 * Add deeply destructured array to test * Add test case for #18634 * Add PR feedback
22 lines
637 B
TypeScript
22 lines
637 B
TypeScript
// @declaration: true
|
|
// @filename: foo.ts
|
|
const foo = { bar: 'hello', bat: 'world', bam: { bork: { bar: 'a', baz: 'b' } } };
|
|
const arr: [0, 1, 2, ['a', 'b', 'c', [{def: 'def'}, {sec: 'sec'}]]] = [0, 1, 2, ['a', 'b', 'c', [{def: 'def'}, {sec: 'sec'}]]];
|
|
export { foo, arr };
|
|
// @filename: index.ts
|
|
import { foo, arr } from './foo';
|
|
export { foo, arr };
|
|
|
|
const { bar: baz, bat, bam: { bork: { bar: ibar, baz: ibaz } } } = foo;
|
|
export { baz, ibaz };
|
|
|
|
const [ , one, , [, bee, , [, {sec} ]]] = arr;
|
|
export { one, bee, sec };
|
|
|
|
const getFoo = () => ({
|
|
foo: 'foo'
|
|
});
|
|
|
|
const { foo: foo2 } = getFoo();
|
|
export { foo2 };
|