index.test-d.ts
raw| 1 | /// <reference types="node"/> |
| 2 | import * as fs from 'fs'; |
| 3 | import {expectType} from 'tsd'; |
| 4 | import stripBomStream = require('.'); |
| 5 | |
| 6 | expectType<stripBomStream.StripBomStream>(stripBomStream()); |
| 7 | |
| 8 | fs.createReadStream('unicorn.txt') |
| 9 | .pipe(stripBomStream()) |
| 10 | .pipe(fs.createWriteStream('unicorn.txt')); |