Skip to content

Commit ca4a0da

Browse files
authored
Restrict possible values of DataTransfer.dropEffect and DataTransfer.effectAllowed. (#891)
* Restrict possible values of DataTransfer.dropEffect and DataTransfer.effectAllowed. * Fix typo.
1 parent 470035c commit ca4a0da

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

baselines/dom.generated.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4146,15 +4146,15 @@ interface DataTransfer {
41464146
*
41474147
* The possible values are "none", "copy", "link", and "move".
41484148
*/
4149-
dropEffect: string;
4149+
dropEffect: "none" | "copy" | "link" | "move";
41504150
/**
41514151
* Returns the kinds of operations that are to be allowed.
41524152
*
41534153
* Can be set (during the dragstart event), to change the allowed operations.
41544154
*
41554155
* The possible values are "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", and "uninitialized",
41564156
*/
4157-
effectAllowed: string;
4157+
effectAllowed: "none" | "copy" | "copyLink" | "copyMove" | "link" | "linkMove" | "move" | "all" | "uninitialized";
41584158
/**
41594159
* Returns a FileList of the files being dragged, if any.
41604160
*/

inputfiles/overridingTypes.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,21 @@
10611061
}
10621062
}
10631063
},
1064+
"DataTransfer": {
1065+
"name": "DataTransfer",
1066+
"properties": {
1067+
"property": {
1068+
"dropEffect": {
1069+
"name": "dropEffect",
1070+
"override-type": "\"none\" | \"copy\" | \"link\" | \"move\""
1071+
},
1072+
"effectAllowed": {
1073+
"name": "effectAllowed",
1074+
"override-type": "\"none\" | \"copy\" | \"copyLink\" | \"copyMove\" | \"link\" | \"linkMove\" | \"move\" | \"all\" | \"uninitialized\""
1075+
}
1076+
}
1077+
}
1078+
},
10641079
"DataTransferItemList": {
10651080
"name": "DataTransferItemList",
10661081
"methods": {

0 commit comments

Comments
 (0)