sfm-js/test-d/index.ts

15 lines
331 B
TypeScript
Raw Normal View History

/**
* Unit testing TypeScript types.
* with https://github.com/SamVerschueren/tsd
*/
import { expectType } from 'tsd';
2021-06-26 14:48:46 +00:00
import { NodeType, MfmUrl } from '../src';
describe('#NodeType', () => {
it('returns node that has sprcified type', () => {
const x = null as unknown as NodeType<'url'>;
expectType<MfmUrl>(x);
2021-03-29 01:14:23 +00:00
});
});