Skip to content

Commit efaf2fc

Browse files
Clarify reflected attributes (#126)
1 parent 100b461 commit efaf2fc

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1717
<!-- ### Removed -->
1818
<!-- ### Fixed -->
1919

20-
<!-- ## [x.y.z] - YYYY-MM-DD -->
20+
## Unreleased
21+
22+
### Fixed
23+
24+
- Clarified that all attributes of a `CustomElement` must be listed in the the `attributes` array, even those reflected from a `CustomElementField`.
2125

2226
## [2.0.0] - 2022-09-12
2327

schema.d.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,9 @@ export interface ClassLike {
466466
/**
467467
* The superclass of this class.
468468
*
469-
* If this class is defined with mixin
470-
* applications, the prototype chain includes the mixin applications
471-
* and the true superclass is computed from them.
469+
* If this class is defined with mixin applications, the prototype chain
470+
* includes the mixin applications and the true superclass is computed
471+
* from them.
472472
*/
473473
superclass?: Reference;
474474

@@ -573,13 +573,16 @@ export interface ClassField extends PropertyLike {
573573
export interface CustomElementField extends ClassField {
574574
/**
575575
* The corresponding attribute name if there is one.
576+
*
577+
* If this property is defined, the attribute must be listed in the classes'
578+
* `attributes` array.
576579
*/
577580
attribute?: string;
578581

579582
/**
580583
* If the property reflects to an attribute.
581584
*
582-
* If this is true, `attribute` must be defined.
585+
* If this is true, the `attribute` property must be defined.
583586
*/
584587
reflects?: boolean;
585588
}

schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
},
9494
"superclass": {
9595
"$ref": "#/definitions/Reference",
96-
"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."
96+
"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."
9797
}
9898
},
9999
"required": [
@@ -383,7 +383,7 @@
383383
},
384384
"superclass": {
385385
"$ref": "#/definitions/Reference",
386-
"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."
386+
"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."
387387
},
388388
"tagName": {
389389
"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.",
@@ -549,7 +549,7 @@
549549
},
550550
"superclass": {
551551
"$ref": "#/definitions/Reference",
552-
"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."
552+
"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."
553553
},
554554
"tagName": {
555555
"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.",
@@ -853,7 +853,7 @@
853853
},
854854
"superclass": {
855855
"$ref": "#/definitions/Reference",
856-
"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."
856+
"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."
857857
}
858858
},
859859
"required": [

0 commit comments

Comments
 (0)