mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
13 lines
230 B
TypeScript
13 lines
230 B
TypeScript
// @strict: true
|
|
// @noEmit: true
|
|
|
|
function example() {}
|
|
|
|
example.isFoo = function isFoo(value: string): asserts value is 'foo' {
|
|
if (value !== 'foo') {
|
|
throw new Error('Not foo');
|
|
}
|
|
};
|
|
|
|
example.isFoo('test');
|