Skip to content

feat: add readonly flag to PropertyLike #118

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

Merged
merged 2 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,11 @@ export interface PropertyLike {
* If the value is a string, it's the reason for the deprecation.
*/
deprecated?: boolean | string;

/**
* Whether the property is read-only.
*/
readonly?: boolean;
}

export interface ClassField extends PropertyLike {
Expand Down
12 changes: 12 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@
"privacy": {
"$ref": "#/definitions/Privacy"
},
"readonly": {
"description": "Whether the property is read-only.",
"type": "boolean"
},
"source": {
"$ref": "#/definitions/SourceReference"
},
Expand Down Expand Up @@ -881,6 +885,10 @@
"description": "Whether the parameter is optional. Undefined implies non-optional.",
"type": "boolean"
},
"readonly": {
"description": "Whether the property is read-only.",
"type": "boolean"
},
"rest": {
"description": "Whether the parameter is a rest parameter. Only the last parameter may be a rest parameter.\nUndefined implies single parameter.",
"type": "boolean"
Expand Down Expand Up @@ -1035,6 +1043,10 @@
"name": {
"type": "string"
},
"readonly": {
"description": "Whether the property is read-only.",
"type": "boolean"
},
"source": {
"$ref": "#/definitions/SourceReference"
},
Expand Down