halfnelson / nativescript-source-to-jsx-def

Walk nativescript source to generate JSX types for `svelte-type-checker-vscode`
Other
4 stars 1 forks source link

Attribute fields should all be optional #5

Closed shirakaba closed 4 years ago

shirakaba commented 4 years ago

Obviously Partial<T> can be applied to the fields to get the same effect as optionality, but the TypeScript compiler debug output is far easier to read with one less layer of generics to unwrap.

In React DOM, attributes are all typed as optional. Indeed, you can construct any DOM node without having specified any attributes.

halfnelson commented 4 years ago

Thanks. Done