dnd
dnd copied to clipboard
Compilation error with Typescript
The file dev-warnings.ts contains the following line:
if (typeof window !== 'undefined' && window[isDisabledFlag]) {
which Typescript in my configuration does not accept, since the isDisabledFlag
is not a known field of the window
object (My configuration should be close to the default NextJS configuration):
Type error: Element implicitly has an 'any' type because index expression is not of type 'number'.
This can be fixed by adding an explicit any cast:
if (typeof window !== 'undefined' && window[isDisabledFlag as any]) {