Can someone shed some light on default import (using Typescript). This is the code using default import (matching the types from index.d.ts)
import hyperactiv from "hyperactiv";
export const observe = hyperactiv.observe;
but then during run time default is undefined
exports.observe = hyperactiv_1.default.observe;
^
TypeError: Cannot read properties of undefined (reading 'observe')
if I do instead import * as hyperactiv from "hyperactiv"; then compiler complains about hyperactiv.observe but it works at runtime.
(my tsconfig: "module": "CommonJS")
Can someone shed some light on default import (using Typescript). This is the code using default import (matching the types from index.d.ts)
but then during run time default is undefined
if I do instead
import * as hyperactiv from "hyperactiv";then compiler complains abouthyperactiv.observebut it works at runtime.(my tsconfig: "module": "CommonJS")