hello-pangea / dnd

Beautiful and accessible drag and drop for lists with React.

Home Page:https://dnd.hellopangea.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation error with Typescript

c-classen opened this issue · comments

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]) {