Skip to content

Commit c4780d9

Browse files
authored
🤖 Merge PR DefinitelyTyped#73309 [rails__activestorage] Add xhr fields and controller types to DirectUpload by @KirbyBrown
1 parent 27c5f0e commit c4780d9

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎types/rails__activestorage/index.d.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export class DirectUpload {
66
id: number;
77
file: File;
88
url: string;
9+
delegate?: DirectUploadDelegate;
910

1011
constructor(file: File, url: string, delegate?: DirectUploadDelegate, customHeaders?: Record<string, string>);
1112

‎types/rails__activestorage/rails__activestorage-tests.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const d = new ActiveStorage.DirectUpload(
2525
customHeaders,
2626
);
2727

28+
console.log(d.delegate);
29+
2830
d.create((error: Error | null) => {
2931
if (error) {
3032
console.log(error.message);

0 commit comments

Comments
 (0)