We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
following code throw runtime error Uncaught TypeError: axes_1.default is not a constructor
Uncaught TypeError: axes_1.default is not a constructor
import Axes from "@egjs/Axes" const axes = new Axes(...)
transpiled version references default property, but Axes constructor is axes_1 itself. that means default property is not constructor.
default
axes_1
// transpiled version var axes_1 = __webpack_require__(4); var axes = new axes_1["default"](...)
I changed Axes.d.ts by my self. but not sure it's right. I can use import * as Axes from "@egjs/axes" with changed definition file;
Axes.d.ts
import * as Axes from "@egjs/axes"
export = Axes; export as namespace Axes; declare class Axes extends Component { axis: { [key: string]: AxisOption; }; static VERSION: string; static PanInput: any; static PinchInput: any; static WheelInput: any; static MoveKeyInput: any; static TRANSFORM: string; static DIRECTION_NONE: DIRECTION; static DIRECTION_LEFT: DIRECTION; static DIRECTION_RIGHT: DIRECTION; static DIRECTION_UP: DIRECTION; static DIRECTION_DOWN: DIRECTION; static DIRECTION_HORIZONTAL: DIRECTION; static DIRECTION_VERTICAL: DIRECTION; static DIRECTION_ALL: DIRECTION; options: AxesOption; em: EventManager; axm: AxisManager; itm: InterruptManager; am: AnimationManager; io: InputObserver; private _inputs; constructor(axis: { [key: string]: AxisOption; }, options: AxesOption, startPos?: Axis); connect(axes: string[] | string, inputType: IInputType): this; disconnect(inputType?: IInputType): this; get(axes?: string[]): Axis; setTo(pos: Axis, duration?: number): this; setBy(pos: Axis, duration?: number): this; isBounceArea(axes?: string[]): boolean; destroy(): void; } declare interface AxesOption { easing?: (x: number) => number; maximumDuration?: number; minimumDuration?: number; deceleration?: number; interruptable?: boolean; } declare namespace Axes { export interface AxesOption { easing?: (x: number) => number; maximumDuration?: number; minimumDuration?: number; deceleration?: number; interruptable?: boolean; } }
The text was updated successfully, but these errors were encountered:
ok. I will check it! thanks
Sorry, something went wrong.
@vreality64 This issue is due to webpack bundling. ref
I will provide ES6 module version. thank you for your report!
chore(env): support es modules
e75e8cc
ref naver#90
ea7fe3a
No branches or pull requests
Description
following code throw runtime error
Uncaught TypeError: axes_1.default is not a constructor
transpiled version references
default
property, but Axes constructor isaxes_1
itself. that means default property is not constructor.Steps to check or reproduce
I changed
Axes.d.ts
by my self. but not sure it's right.I can use
import * as Axes from "@egjs/axes"
with changed definition file;The text was updated successfully, but these errors were encountered: