import { expectAssignable , expectNotAssignable } from 'tsd' ; import { PublicMethodsOf } from '../..' ; class Test { public name : string = '' ; getName ( ) { return this . name ; } private getDoubleName ( ) { return this . name . repeat ( 2 ) ; } } expectAssignable < PublicMethodsOf < Test > > ( { getName ( ) { return '' ; } , } ) ; expectNotAssignable < PublicMethodsOf < Test > > ( { getName ( ) { return 1 ; } , } ) ; expectNotAssignable < PublicMethodsOf < Test > > ( { getDoubleName ( ) { return 1 ; } , } ) ;