You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					15 lines
				
				472 B
			
		
		
			
		
	
	
					15 lines
				
				472 B
			| 
											3 years ago
										 | import { expectType } from 'tsd' | ||
|  | import Warinig, { BuildWarnOptsFn, WarnOpts } from './' | ||
|  | 
 | ||
|  | const warning = Warinig() | ||
|  | const buildWarnOpts = warning.create('FastifyWarning', 'CODE', 'message') | ||
|  | expectType<BuildWarnOptsFn>(buildWarnOpts) | ||
|  | const opts = buildWarnOpts() | ||
|  | expectType<WarnOpts>(opts) | ||
|  | expectType<string>(opts.code) | ||
|  | expectType<string>(opts.message) | ||
|  | expectType<string>(opts.name) | ||
|  | 
 | ||
|  | expectType<void>(warning.emit('CODE')) | ||
|  | expectType<Map<string, boolean>>(warning.emitted) |