We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An interface
export interface Props { readonly myArray: readonly string[]; }
fails with =:
src/index.ts:3:17 - error JSII3001: Type "ReadonlyArray" cannot be used as the property type because it is private or @internal
preventing using it as
const arr = ["a","b"] as const
It should compile, ReadonlyArray<> is a TS type.
export interface Props { readonly p: readonly string[]; } export class C { private s: readonly string[]; constructor(p: Props) { this.s = p.p; } f() { return this.s; } }
Map ReadonlyArray to a plain array in languages not supporting readonly.
No response
latest
Linux
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
An interface
fails with =:
preventing using it as
Expected Behavior
It should compile, ReadonlyArray<> is a TS type.
Current Behavior
src/index.ts:3:17 - error JSII3001: Type "ReadonlyArray" cannot be used as the property type because it is private or @internal
Reproduction Steps
Possible Solution
Map ReadonlyArray to a plain array in languages not supporting readonly.
Additional Information/Context
No response
SDK version used
latest
Environment details (OS name and version, etc.)
Linux
The text was updated successfully, but these errors were encountered: