https://gist.github.com/slavasitnikov/887e240be9b08b35d0b67516d4e6ce08
npm i
./node_modules/.bin/tsc
Compilation errors:
node_modules/popper.js/index.d.ts(38,5): error TS2411: Property 'shift' of type 'BaseModifier | undefined' is not assignable to string index type 'BaseModifier & Record<string, any>'.
node_modules/popper.js/index.d.ts(39,5): error TS2411: Property 'offset' of type '(BaseModifier & { offset?: string | number | undefined; }) | undefined' is not assignable to string index type 'BaseModifier & Record<string, any>'.
node_modules/popper.js/index.d.ts(42,5): error TS2411: Property 'preventOverflow' of type '(BaseModifier & { priority?: Position[] | undefined; padding?: number | undefined; boundariesElem...' is not assignable to string index type 'Base
Modifier & Record<string, any>'.
node_modules/popper.js/index.d.ts(47,5): error TS2411: Property 'keepTogether' of type 'BaseModifier | undefined' is not assignable to string index type 'BaseModifier & Record<string, any>'.
node_modules/popper.js/index.d.ts(48,5): error TS2411: Property 'arrow' of type '(BaseModifier & { element?: string | Element | undefined; }) | undefined' is not assignable to string index type 'BaseModifier & Record<string, any>'.
node_modules/popper.js/index.d.ts(51,5): error TS2411: Property 'flip' of type '(BaseModifier & { behavior?: Position[] | "flip" | "clockwise" | "counterclockwise" | undefined; ...' is not assignable to string index type 'BaseModifier &
Record<string, any>'.
node_modules/popper.js/index.d.ts(56,5): error TS2411: Property 'inner' of type 'BaseModifier | undefined' is not assignable to string index type 'BaseModifier & Record<string, any>'.
node_modules/popper.js/index.d.ts(57,5): error TS2411: Property 'hide' of type 'BaseModifier | undefined' is not assignable to string index type 'BaseModifier & Record<string, any>'.
node_modules/popper.js/index.d.ts(58,5): error TS2411: Property 'applyStyle' of type '(BaseModifier & { onLoad?: Function | undefined; gpuAcceleration?: boolean | undefined; }) | unde...' is not assignable to string index type 'BaseModif
ier & Record<string, any>'.
It seems it is the same bug here: https://github.com/FezVrasta/popper.js/issues/414
I fixed (for now) by removing strict null checks from TS and got it to compile in case that helps anyone.
This is fixed in popper.js 1.12.5 and greater.
It's this issue.
As a temporary fix, update this line in your index.d.ts.
Looks like this is fixed in v1.11.1 as well. That might be an easier version bump to get out a quick fix?
Can this be fixed on next labs 0.12.0 release?
Hey, I figured this out. webpack 3 defaults to loading the "module" entry from package.json, which is a breaking change since webpack 1. I got this working with the latest popper.js in my PR here: https://github.com/palantir/blueprint/pull/1786/commits/4c141b92d1b3e765f99f8dd083232d63bdf2ebeb
Should be shipped ~in the next release~ soon.
Most helpful comment
Can this be fixed on next labs 0.12.0 release?