sfm-js/test-d/index.ts

15 lines
347 B
TypeScript
Raw Normal View History

/**
* Unit testing TypeScript types.
* with https://github.com/SamVerschueren/tsd
*/
import { expectType } from 'tsd';
import { getNodeByType, MfmUrl } from '../built';
describe('#getNodeByType', () => {
it('returns node that has sprcified type', () => {
const x = null as unknown as getNodeByType<'url'>;
expectType<MfmUrl>(x);
})
});