@yokowasis/types-webcomponents
v1.0.43
Published
Type definitions for yokowasis webcomponents custom elements
Downloads
4,014
Maintainers
Readme
@yokowasis/types-webcomponents
TypeScript type definitions for the custom elements in the yokowasis webcomponents project.
Install
npm install -D @yokowasis/types-webcomponentsor
pnpm add -D @yokowasis/types-webcomponentsWhat it provides
HTMLElementTagNameMapentries for custom elements likecs-dashboard,cs-data-table,cs-input, and more.- JSX intrinsic element typing.
- Svelte
svelteHTML.IntrinsicElementstyping. - Global helper typings for
toast,getVal, andsetVal.
Usage
No runtime import is required. Ensure your tsconfig.json includes the package types (usually automatic under node_modules).
Use In IDE (VS Code)
- Install the package:
npm install -D @yokowasis/types-webcomponents- Make sure TypeScript loads the package types.
Usually it works automatically. If not, add this to your tsconfig.json:
{
"compilerOptions": {
"types": ["@yokowasis/types-webcomponents"]
}
}- Restart TypeScript Server in VS Code:
- Open Command Palette
- Run:
TypeScript: Restart TS Server
- If autocomplete is still missing, add a local declaration bridge (for example
src/app.d.ts):
/// <reference types="@yokowasis/types-webcomponents" />Then reload VS Code window.
