
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
@types/mapbox__shelf-pack
Advanced tools
TypeScript definitions for @mapbox/shelf-pack
npm install --save @types/mapbox__shelf-pack
This package contains type definitions for @mapbox/shelf-pack (https://github.com/mapbox/shelf-pack).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__shelf-pack.
/* eslint-disable @definitelytyped/no-declare-current-package */
// eslint-disable-next-line @definitelytyped/no-single-declare-module
declare module "@mapbox/shelf-pack" {
export = ShelfPack;
class ShelfPack {
constructor(width?: number, height?: number, options?: ShelfPack.CreateOption);
pack(
bins: Array<ShelfPack.RequestShort | ShelfPack.RequestLong>,
options?: ShelfPack.PackOption,
): ShelfPack.Bin[];
packOne(w: number, h: number, id?: ShelfPack.ID): ShelfPack.Bin;
getBin(id: ShelfPack.ID): ShelfPack.Bin;
ref(bin: ShelfPack.Bin): number;
unref(bin: ShelfPack.Bin): number;
clear(): void;
resize(w: number, h: number): boolean;
w: number;
h: number;
}
namespace ShelfPack {
class Bin {
constructor(id: ID, x: number, y: number, w: number, h: number, maxw?: number, maxh?: number);
id: ID;
x: number;
y: number;
w: number;
h: number;
}
type ID = number | string;
interface Request {
id?: ID | undefined;
}
interface RequestShort extends Request {
w: number;
h: number;
}
interface RequestLong extends Request {
width: number;
height: number;
}
interface PackOption {
/// If true , the supplied bin objects will be updated inplace with x and y properties
inPlace?: boolean | undefined;
}
interface CreateOption {
/// If true , the sprite will automatically grow
autoResize?: boolean | undefined;
}
}
}
These definitions were written by Gyusun Yeom.
FAQs
TypeScript definitions for @mapbox/shelf-pack
The npm package @types/mapbox__shelf-pack receives a total of 1,204 weekly downloads. As such, @types/mapbox__shelf-pack popularity was classified as popular.
We found that @types/mapbox__shelf-pack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.