π Search Terms
- isolated declarations
- computed keys
- object literals
π Version & Regression Information
5.5.0-dev.20240514
β― Playground Link
https://www.typescriptlang.org/play/?isolatedDeclarations=true&ts=5.5.0-dev.20240514#code/KYDwDg9gTgLgBAYwgOwM7wNLAJ5wLxwBEMAFsFtoQNwBQNAJsAgDYCGUwcA5sxAEatmcAN4044uKEixEKdHADivAcwr4ipYEv6CKhMRKnR4SNPACqyAJYBHAK7AAytgC2fCMwBccO9fudUV3dmWglJcGNZMzgAORRLWwdnNw9vQJSQmgBfOiMZU3kAQXVRMIBtCgBdbxgoBwAaA3Ey5OCAOhgIR1qrZC4AFVYuargAM0FUYEbyhP9WjxHx5knpiTLtFSrvJZXsmiA
π» Code
export const Key = "theKey";
declare global {
export const GlobalKey = "theGlobalKey"
export const UniqueSymbol: unique symbol;
export const NonUniqueSymbol: symbol;
}
export const A = {
[Key]: true,
[Symbol.toStringTag]: false,
[UniqueSymbol]: false,
[GlobalKey]: false,
}
π Actual behavior
TypeScript is emitting the computed property keys with type information that can not be determined without a type checker.
export declare const Key = "theKey";
declare global {
export const GlobalKey = "theGlobalKey";
export const UniqueSymbol: unique symbol;
export const NonUniqueSymbol: symbol;
}
export declare const A: {
theKey: boolean;
[Symbol.toStringTag]: boolean;
[UniqueSymbol]: boolean;
theGlobalKey: boolean;
};
π Expected behavior
export declare const Key = "theKey";
declare global {
export const GlobalKey = "theGlobalKey";
export const UniqueSymbol: unique symbol;
export const NonUniqueSymbol: symbol;
}
export declare const A: {
[Key]: true,
[Symbol.toStringTag]: false,
[UniqueSymbol]: false,
[GlobalKey]: false,
};
Additional information about the issue
No response
π Search Terms
π Version & Regression Information
5.5.0-dev.20240514
β― Playground Link
https://www.typescriptlang.org/play/?isolatedDeclarations=true&ts=5.5.0-dev.20240514#code/KYDwDg9gTgLgBAYwgOwM7wNLAJ5wLxwBEMAFsFtoQNwBQNAJsAgDYCGUwcA5sxAEatmcAN4044uKEixEKdHADivAcwr4ipYEv6CKhMRKnR4SNPACqyAJYBHAK7AAytgC2fCMwBccO9fudUV3dmWglJcGNZMzgAORRLWwdnNw9vQJSQmgBfOiMZU3kAQXVRMIBtCgBdbxgoBwAaA3Ey5OCAOhgIR1qrZC4AFVYuargAM0FUYEbyhP9WjxHx5knpiTLtFSrvJZXsmiA
π» Code
π Actual behavior
TypeScript is emitting the computed property keys with type information that can not be determined without a type checker.
π Expected behavior
Additional information about the issue
No response