DefinitelyTyped/types/clean-stack/clean-stack-tests.ts
2017-08-10 16:51:55 -07:00

9 lines
229 B
TypeScript

import cleanStack = require('clean-stack');
const error = new Error('Missing unicorn');
if (error.stack) {
cleanStack(error.stack); // $ExpectType string
cleanStack(error.stack, {pretty: true}); // $ExpectType string
}