typescript-shims

Generate TypeScript declaration shims for Vue 3 component and SVG imports.

Updated Nov 20, 2025
One-click install
npx skills add https://github.com/sayali-ingle-pdl/adusa-ai-vuejs-app-template --skill typescript-shims
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: typescript-shims
Source: https://github.com/sayali-ingle-pdl/adusa-ai-vuejs-app-template/tree/main/.github/agents/app-starter/agents-context/skills/typescript-shims
Command: npx skills add https://github.com/sayali-ingle-pdl/adusa-ai-vuejs-app-template --skill typescript-shims

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill generates TypeScript declaration files (shims) to enable type-safe imports of non-TypeScript modules in a Vue 3 application.

Core Features & Use Cases

  • Vue Component Shims: Declare a module pattern for *.vue files, import the appropriate Vue component type, and type the default export as a Vue component definition with flexible generics.
  • SVG Asset Shims: Provide module declarations for *.svg as components and for *.svg?url as strings to support both inline SVG usage and URL-based asset referencing.
  • Use Case: Integrate robust typing in a Vue 3 project to safely import Vue components and SVG assets across the codebase.

Quick Start

Run the shims generator in your Vue 3 project to create shims-vue.d.ts and shims-svg.d.ts in your src directory.

Frequently Asked Questions about typescript-shims

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix TypeScript errors when importing .vue files in a Vue 3 project?▼

To fix TypeScript errors for .vue imports in a Vue 3 project, you need TypeScript declaration files called shims. Generating a shims-vue.d.ts file declares the module pattern for *.vue files and types the default export as a Vue 3 DefineComponent.

What is a TypeScript shim and when do I need it for SVG assets?▼

A TypeScript shim is a declaration file that enables type-safe imports of non-TypeScript modules. You need shims for SVG assets when you want to import *.svg files as components or reference them as URL strings via *.svg?url in Vite.

How do I set up type declarations for importing SVG files with Vite ?url suffixes?▼

To set up type declarations for Vite ?url suffixes, generate an shims-svg.d.ts file. This declaration file provides module declarations for *.svg as components and specifically types *.svg?url imports as URL strings.

Does this TypeScript declaration generator work with both inline SVG and URL imports?▼

Yes, the TypeScript declaration generator works with both inline SVG and URL imports. It creates module declarations that support *.svg as inline SVG components and types *.svg?url imports as strings for Vite bundler conventions.

Why does my Vue 3 project require shims for TypeScript type checking?▼

Your Vue 3 project requires shims for TypeScript type checking because TypeScript cannot natively parse non-TypeScript modules. Shims provide the necessary module declarations to safely import and type-check Vue components and SVG assets across your codebase.

What is the best way to enable type-safe imports for Vue components and SVG assets?▼

The best way to enable type-safe imports for Vue components and SVG assets is to generate TypeScript declaration files. Creating shims-vue.d.ts and shims-svg.d.ts aligns with Vue 3 DefineComponent types and Vite bundler conventions for robust typing.