DefinitelyTyped/types/extract-stack/extract-stack-tests.ts
2017-08-10 16:52:13 -07:00

9 lines
294 B
TypeScript

import extractStack = require('extract-stack');
const error = new Error('Missing unicorn');
extractStack(error); // $ExpectType string
extractStack(error.stack); // $ExpectType string
extractStack.lines(error); // $ExpectType string[]
extractStack.lines(error.stack); // $ExpectType string[]