Node.js 从typescript导入类型定义(d.ts)

Node.js 从typescript导入类型定义(d.ts),node.js,typescript,css-modules,Node.js,Typescript,Css Modules,我有一个生成.d.ts文件的工具 问题是它会生成多个“常量字符串”,就像这样 export const btnblock: string; export const btnlg: string; export const buttonRow: string; 我想从example.d.ts中将它们作为类型输入脚本导入 我不知道如何,像这样的东西,但它不工作 import * as MyType from './example.d.ts'

我有一个生成.d.ts文件的工具

问题是它会生成多个“常量字符串”,就像这样

export const btnblock: string;
export const btnlg: string;
export const buttonRow: string;
我想从example.d.ts中将它们作为类型输入脚本导入

我不知道如何,像这样的东西,但它不工作

import * as MyType from './example.d.ts'