Skip to content

Commit 5bac632

Browse files
committed
fix: change Buffer type to ArrayBuffer
1 parent 5ceb69f commit 5bac632

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class ScribeMIClient {
130130
}
131131

132132
async submitTask(
133-
file: Buffer,
133+
file: ArrayBuffer,
134134
props: { filetype: MIFileType; filename: string; companyname?: string }
135135
) {
136136
const md5checksum = Base64.stringify(MD5(WordArray.create(file)));

tests/mi.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ describe('error handling', () => {
6060

6161
describe('endpoints can be called', () => {
6262
const client = new ScribeMIClient(env);
63-
let testFile: Buffer;
63+
let testFile: ArrayBuffer;
6464
let jobid = '';
6565
let task: MITask;
6666

6767
beforeAll(async () => {
6868
await client.authenticate({ username, password });
69-
testFile = await readFile('tests/assets/test-pdf.pdf');
69+
testFile = (await readFile('tests/assets/test-pdf.pdf')).buffer;
7070
});
7171

7272
it('submitTask', async () => {

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
/* Basic Options */
66
"incremental": true /* Enable incremental compilation */,
7-
"target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
8-
"module": "NodeNext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
7+
"target": "ES2024" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
8+
"module": "nodenext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
99
"declaration": true /* Generates corresponding '.d.ts' file. */,
1010
"declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
1111
"sourceMap": true /* Generates corresponding '.map' file. */,

0 commit comments

Comments
 (0)