After using npm, I successfully downloaded easystar.js
.
The code within this file is structured as follows:
export const TOP: 'TOP'
export const TOP_RIGHT: 'TOP_RIGHT'
export const RIGHT: 'RIGHT'
export const BOTTOM_RIGHT: 'BOTTOM_RIGHT'
export const BOTTOM: 'BOTTOM'
export const BOTTOM_LEFT: 'BOTTOM_LEFT'
export const LEFT: 'LEFT'
export const TOP_LEFT: 'TOP_LEFT'
type Direction = 'TOP' | 'TOP_RIGHT' | 'RIGHT' | 'BOTTOM_RIGHT' | 'BOTTOM' | 'BOTTOM_LEFT' | 'LEFT' | 'TOP_LEFT'
export class js {
/**
* Description of the method and its functionality.
*
* @param {Array|Number} tiles An array of numbers indicating walkable tiles on the grid.
*/
setAcceptableTiles(tiles: number[] | number): void
.
.
.
removeAllDirectionalConditions(): void
}
I have attempted to import it in various ways:
import * as easystar from 'easystarjs';
import 'easystarjs';
import {js} from 'easystarjs';
However, upon inspection with a breakpoint, no reference to easystar or js can be found within my window object. What could be the issue here?