3.1.0 • Published 2 years ago
with-properties v3.1.0
Install
$ npm i with-properties
API
Table of Contents
withProperties
class Foo extends withProperties(
HTMLElement,
class {
string? = String
number? = Number
boolean = Boolean
implicitString = 'string'
implicitNumber = 123
implicitBoolean = true
somethingElse? = new Uint8Array(1)
}
) {}
Parameters
parent
C The parent constructor to extend (usuallyHTMLElement
)propsClass
Constructor\ A "props" class to create the properties from
Returns any A base constructor to be extended from
Contribute
All contributions are welcome!
License
MIT © 2021 stagas