Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nativescript-dom/types
Single, centralized TypeScript types for NativeScript web frameworks.
https://github.com/nativescript-dom/types
angular dom html nativescript nativescript-plugin nativescript-vue react-nativescript solidjs svelte-native types typescript vue
Last synced: about 1 month ago
JSON representation
Single, centralized TypeScript types for NativeScript web frameworks.
- Host: GitHub
- URL: https://github.com/nativescript-dom/types
- Owner: nativescript-dom
- License: mit
- Created: 2023-02-22T16:42:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-03T05:57:55.000Z (2 months ago)
- Last Synced: 2024-10-03T09:05:58.921Z (about 1 month ago)
- Topics: angular, dom, html, nativescript, nativescript-plugin, nativescript-vue, react-nativescript, solidjs, svelte-native, types, typescript, vue
- Language: TypeScript
- Homepage:
- Size: 345 KB
- Stars: 28
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Single, centralized TypeScript types for NativeScript web frameworks.NativeScript's core has been first-class Typescript since very long but sadly the benefits in terms of better auto-complete/intellisense for end-developers in code editors hasn't been properly propgated down especially when you use NativeScript with Vue, Svelte, React and other web frameworks. The main reason for this is that all these frameworks require all the core views to be like HTML elements. Hence it requires rewriting the types or generating them from core which are hard to maintain and do not have the best quality as compared to @nativescript/core. If types change in core or a new prop is added or some part of the JSDoc get's updated, it's not transferred down to the end-developer until a new version of the flavor is released.
We need something better.
## A single types system
Finally we have a solution to this. A single & undocked type system that combines DOM & core into a single interface that can be used across all web frameworks. So now we update the types in one place and everyone will get improved and better types automatically without doing any extra work or any flavor updates.
- Types work like a bridge between core, dom & the web renderer
- JSDoc support, If some prop has JSDoc in core, it shows up in code-editor automatically, better core, better types
- Fully conforms & extends `libdom.d.ts` to provide complete HTML DOM types
- Prop filtering, props and attributes are filtered, only types that should be exposed in DOM are there. No pollution from @nativescript/core
- Easy to maintain, we just need to update types in one place and everyone gets better and updated types automatically.
- Easy to support new frameworks, takes 10 minutes at most.
- Work hand-in-hand with existing renderers, just install and get better intellisense
- Platform prefixed props such as `android:text` or `ios:backgroundColor`
- Fully typed Events for each View
- Support for Plugins## Installation
Get the types packages for your project and boost DX of your team while developing NativeScript apps to the next level.
**[@nativescript-dom/core-types](https://www.npmjs.com/package/@nativescript-dom/core-types)**
Renderer agnostic typeScript definitions for [@nativescript/core](https://github.com/NativeScript/NativeScript) views exposed as HTML DOM elements
**[@nativescript-dom/react-types](https://www.npmjs.com/package/@nativescript-dom/react-types)**
TypeScript definitions for [@nativescript/core](https://github.com/NativeScript/NativeScript) views exposed as JSX intrinsic elements for react
**[@nativescript-dom/solidjs-types](https://www.npmjs.com/package/@nativescript-dom/solidjs-types)**
TypeScript definitions for[@nativescript/core](https://github.com/NativeScript/NativeScript) views exposed as JSX intrinsic elements for solidjs
**[@nativescript-dom/svelte-types](https://www.npmjs.com/package/@nativescript-dom/svelte-types)**
TypeScript definitions for [@nativescript/core](https://github.com/NativeScript/NativeScript) views exposed as JSX intrinsic elements for svelte
**[@nativescript-dom/vue-types](https://www.npmjs.com/package/@nativescript-dom/vue-types)**
TypeScript definitions for [@nativescript/core](https://github.com/NativeScript/NativeScript) views exposed as JSX intrinsic elements for vue
**[@nativescript-dom/angular-types](https://www.npmjs.com/package/@nativescript-dom/angular-types)**
Typescript definitions for @nativescript/angular that expose [@nativescript/core](https://github.com/NativeScript/NativeScript)e views as DOM elements in HTML templates and provide 100% complete intellisense in code editors
#
MIT Licensed