Skip to content

Viewport.d.ts using wrong imports #528

@mike-lischke

Description

@mike-lischke

The imports used in Viewport.d.ts cause eslint and VS Code to fail recognizing correct type information, which results in errors and failed code navigation. The current imports are:

import { Container, DestroyOptions, EventSystem, IHitArea, Point, PointData, Rectangle, Ticker } from 'pixi.js';
import { InputManager } from './InputManager';
import { PluginManager } from './PluginManager';
import { IAnimateOptions, IBounceOptions, IClampOptions, IClampZoomOptions, IDecelerateOptions, IDragOptions, IFollowOptions, IMouseEdgesOptions, IPinchOptions, ISnapOptions, ISnapZoomOptions, IWheelOptions } from './plugins/';

while they should be:

import { Container, DestroyOptions, EventSystem, IHitArea, Point, PointData, Rectangle, Ticker } from 'pixi.js';
import { InputManager } from './InputManager.js';
import { PluginManager } from './PluginManager.js';
import { IAnimateOptions, IBounceOptions, IClampOptions, IClampZoomOptions, IDecelerateOptions, IDragOptions, IFollowOptions, IMouseEdgesOptions, IPinchOptions, ISnapOptions, ISnapZoomOptions, IWheelOptions } from './plugins/index.js';

Note the mix of imports with and without .js extension. It is now recommended that imports should include the extension for new Node versions to find them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions