@tefe/typescript-type-tester
v0.0.0
Published
test typescript type with jest and typescript
Downloads
1
Readme
@tefe/typescript-type-tester
用 typescript 解析 ts 文件并返回错误信息和打印某系相关信息
Usage
npm i -D @tefe/typescript-type-tester
import typescriptTypeTester from '@tefe/typescript-type-tester';
const { ['a.ts']: errorStringArrA, ['b.ts']: errorStringArrB } = typescriptTypeTester(
['a.ts', 'b.tsx'],
'/User/skipper/Documenets/directory'
);
例如 error.ts:
打印 jest snapshot 信息:
Source