JetBrains Web Types Generator (src/web-types.ts)

ant-design-vue · antd-tools/generator-types/src/web-types.ts · typescript · MIT
ui, dev-tools, lang:typescript, fw:vue, tag:json, tag:generator

Generates web-types JSON metadata for Vue components to provide IDE autocompletion support. Reuse when creating developer tooling for Vue component libraries.

// Source: https://github.com/vueComponent/ant-design-vue | License: MIT | Copyright 2017-present ant-design-vue
// Provided via justclaw.it.com; keep this notice with the code.
import type { VueTag, Options } from './type';

// create web-types.json to provide autocomplete in JetBrains IDEs
export function genWebTypes(tags: VueTag[], options: Options) {
  return {
    $schema: 'https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json',
    framework: 'vue',
    name: options.name,
    version: options.version,
    contributions: {
      html: {
        tags,
        attributes: [],
        'types-syntax': 'typescript',
      },
    },
  };
}

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key