Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>typeof-sjsoncNew to Visual Studio Code? Get it now.
typeof-sjsonc

typeof-sjsonc

wulunyi

|
451 installs
| (1) | Free
typeof-sjsonc description
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vsce-typeof-sjsonc

将剪切板中的 json/jsonc/jsonLick 文本转换为 TypeScript interface

commands

命令: typeof from clipboard

剪贴板内容

{
    // 123
    "a": 123,
    /** true */
    b: true,
    c: [{d: 'test'}]
}

输入结果

export interface Root {
    /** 123 */
    a: number;
    /** true */
    b: boolean;
    c: Array<{
        d: string;
    }>;
}

快捷键

  • ctrl+alt+V 普通模式,将输入转换为一整个 interface
  • ctrl+alt+S 分割模式,将输入中对象分割为多个 interface

复制完毕后进入粘贴的位置执行快捷键

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft