npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nativescript-dom/core-types

v1.0.31

Published

Renderer agnostic typeScript definitions for @nativescript/core views exposed as HTML DOM elements

Downloads

289

Readme

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

Renderer agnostic typeScript definitions for @nativescript/core views exposed as HTML DOM elements

@nativescript-dom/react-types

TypeScript definitions for @nativescript/core views exposed as JSX intrinsic elements for react

@nativescript-dom/solidjs-types

TypeScript definitions for@nativescript/core views exposed as JSX intrinsic elements for solidjs

@nativescript-dom/svelte-types

TypeScript definitions for @nativescript/core views exposed as JSX intrinsic elements for svelte

@nativescript-dom/vue-types

TypeScript definitions for @nativescript/core views exposed as JSX intrinsic elements for vue

@nativescript-dom/angular-types

Typescript definitions for @nativescript/angular that expose @nativescript/coree views as DOM elements in HTML templates and provide 100% complete intellisense in code editors

MIT Licensed