Skip to content
New issue

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

Add readonly option for TypeScript Language #2534

Merged

Conversation

inferrinizzard
Copy link
Contributor

@inferrinizzard inferrinizzard commented Mar 17, 2024

Description

Adds a 'prefer-readonly' option to TypeScript output.

Related Issue

#2280

Previous Behaviour / Output

export interface TopLevel {
    age:     number;
    country: Country;
    females: number;
    males:   number;
    total:   number;
    year:    number;
}

New Behaviour / Output

export interface TopLevel {
    readonly age:     number;
    readonly country: Country;
    readonly females: number;
    readonly males:   number;
    readonly total:   number;
    readonly year:    number;
}

How Has This Been Tested?

Added to test suite under quickTestRendererOptions

Screenshots (if appropriate):

N/a

@inferrinizzard inferrinizzard changed the title [TEST] add readonly option to TypeScript language Add readonly option TypeScript Language Mar 30, 2024
@inferrinizzard inferrinizzard changed the title Add readonly option TypeScript Language Add readonly option for TypeScript Language Mar 30, 2024
@dvdsgl
Copy link
Member

dvdsgl commented Mar 30, 2024

Why prefer-readonly and not readonly? All of the settings are preferences, no?

@dvdsgl dvdsgl merged commit a92aa33 into glideapps:master Mar 31, 2024
24 checks passed
@inferrinizzard inferrinizzard deleted the feat/typescript/readonly-interface branch May 21, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants