legends810 commited on
Commit
efe1b37
·
verified ·
1 Parent(s): 357d218

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. types/istextorbinary.d.ts +15 -0
types/istextorbinary.d.ts ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @note For some reason the types aren't picked up from node_modules so I declared the module here
3
+ * with only the function that we use.
4
+ */
5
+ declare module 'istextorbinary' {
6
+ export interface EncodingOpts {
7
+ /** Defaults to 24 */
8
+ chunkLength?: number;
9
+
10
+ /** If not provided, will check the start, beginning, and end */
11
+ chunkBegin?: number;
12
+ }
13
+
14
+ export function getEncoding(buffer: Buffer | null, opts?: EncodingOpts): 'utf8' | 'binary' | null;
15
+ }