Skip to content
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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
<!-- ### Removed -->
<!-- ### Fixed -->

<!-- ## [x.y.z] - YYYY-MM-DD -->
## Unreleased

### Fixed

- Clarified that all attributes of a `CustomElement` must be listed in the the `attributes` array, even those reflected from a `CustomElementField`.

## [2.0.0] - 2022-09-12

Expand Down
11 changes: 7 additions & 4 deletions schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,9 @@ export interface ClassLike {
/**
* The superclass of this class.
*
* If this class is defined with mixin
* applications, the prototype chain includes the mixin applications
* and the true superclass is computed from them.
* If this class is defined with mixin applications, the prototype chain
* includes the mixin applications and the true superclass is computed
* from them.
*/
superclass?: Reference;

Expand Down Expand Up @@ -573,13 +573,16 @@ export interface ClassField extends PropertyLike {
export interface CustomElementField extends ClassField {
/**
* The corresponding attribute name if there is one.
*
* If this property is defined, the attribute must be listed in the classes'
* `attributes` array.
*/
attribute?: string;

/**
* If the property reflects to an attribute.
*
* If this is true, `attribute` must be defined.
* If this is true, the `attribute` property must be defined.
*/
reflects?: boolean;
}
Expand Down
8 changes: 4 additions & 4 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
},
"superclass": {
"$ref": "#/definitions/Reference",
"description": "The superclass of this class.\n\nIf this class is defined with mixin\napplications, the prototype chain includes the mixin applications\nand the true superclass is computed from them."
"description": "The superclass of this class.\n\nIf this class is defined with mixin applications, the prototype chain\nincludes the mixin applications and the true superclass is computed\nfrom them."
}
},
"required": [
Expand Down Expand Up @@ -383,7 +383,7 @@
},
"superclass": {
"$ref": "#/definitions/Reference",
"description": "The superclass of this class.\n\nIf this class is defined with mixin\napplications, the prototype chain includes the mixin applications\nand the true superclass is computed from them."
"description": "The superclass of this class.\n\nIf this class is defined with mixin applications, the prototype chain\nincludes the mixin applications and the true superclass is computed\nfrom them."
},
"tagName": {
"description": "An optional tag name that should be specified if this is a\nself-registering element.\n\nSelf-registering elements must also include a CustomElementExport\nin the module's exports.",
Expand Down Expand Up @@ -549,7 +549,7 @@
},
"superclass": {
"$ref": "#/definitions/Reference",
"description": "The superclass of this class.\n\nIf this class is defined with mixin\napplications, the prototype chain includes the mixin applications\nand the true superclass is computed from them."
"description": "The superclass of this class.\n\nIf this class is defined with mixin applications, the prototype chain\nincludes the mixin applications and the true superclass is computed\nfrom them."
},
"tagName": {
"description": "An optional tag name that should be specified if this is a\nself-registering element.\n\nSelf-registering elements must also include a CustomElementExport\nin the module's exports.",
Expand Down Expand Up @@ -853,7 +853,7 @@
},
"superclass": {
"$ref": "#/definitions/Reference",
"description": "The superclass of this class.\n\nIf this class is defined with mixin\napplications, the prototype chain includes the mixin applications\nand the true superclass is computed from them."
"description": "The superclass of this class.\n\nIf this class is defined with mixin applications, the prototype chain\nincludes the mixin applications and the true superclass is computed\nfrom them."
}
},
"required": [
Expand Down