mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
10 lines
387 B
TypeScript
10 lines
387 B
TypeScript
import htmlEncodingSniffer = require('html-encoding-sniffer');
|
|
|
|
// test type exports
|
|
type Opts = htmlEncodingSniffer.Options;
|
|
|
|
const bytes = new Uint8Array([1, 2]);
|
|
htmlEncodingSniffer(bytes); // $ExpectType string
|
|
htmlEncodingSniffer(bytes, { defaultEncoding: 'utf-8' }); // $ExpectType string
|
|
htmlEncodingSniffer(bytes, { transportLayerEncodingLabel: 'utf-8' }); // $ExpectType string
|