TypeScript/tests/baselines/reference/declarationEmitReadonlyComputedProperty.errors.txt

24 lines
859 B
Plaintext

tests/cases/compiler/index.ts(3,14): error TS4023: Exported variable 'spread' has or is using name 'SYMBOL' from external module "tests/cases/compiler/bug" but cannot be named.
==== tests/cases/compiler/bug.ts (0 errors) ====
export const SYMBOL = Symbol()
export interface Interface {
readonly [SYMBOL]: string; // remove readonly and @showEmit to see the expected error
}
export function createInstance(): Interface {
return {
[SYMBOL]: ''
}
}
==== tests/cases/compiler/index.ts (1 errors) ====
import { createInstance } from './bug'
export const spread = {
~~~~~~
!!! error TS4023: Exported variable 'spread' has or is using name 'SYMBOL' from external module "tests/cases/compiler/bug" but cannot be named.
...createInstance(),
}