ember-fastboot / simple-dom

208 stars 33 forks source link

Add stricter nodeType type annotations #47

Closed tomdale closed 6 years ago

tomdale commented 6 years ago

This commit makes all of the node subclasses in simple-dom consistent with Element, which includes a more-refined nodeType property type annotation. By making these types enum values, it's easier for external systems to better type check passed values.

krisselden commented 6 years ago

I prefer this but it makes it so you can't pass a lib.dom.d.ts Element, Text, Document etc unless those have narrowed types Element { nodeType: 1 }