#Is there a way to use *some* of a @types package's declaration files, but not all?

3 messages · Page 1 of 1 (latest)

grim apex
#

I am devDepending on a package named @types/twine-sugarcube. This is its index.d.ts file:

// Type definitions for non-npm package sugarcube 2.36
// Project: https://github.com/tmedwards/sugarcube-2
// Definitions by: ezsh <https://github.com/ezsh>
//                 Thomas M. Edwards <https://github.com/tmedwards>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

// Minimum TypeScript Version: 3.9

/// <reference types="jquery"/>

export as namespace TwineSugarCube;

export * from "./extensions";
export * from "./functions"; // !!! I don't want to execute this line
export * from "./globals";
export * from "./jquery";

export * from "./audio";
export * from "./config";
export * from "./engine";
export * from "./macro";
export * from "./passage";
export * from "./save";
export * from "./scripting";
export * from "./settings";
export * from "./state";
export * from "./story";
export * from "./sugarcube";
export * from "./template";
export * from "./ui";
export * from "./userdata";
export * from "./wiki";

In my project, is there a way I can exclude export * from "./functions";? More specifically, that functions.d.ts file is wrapped in a declare global { ... }. Is there a way I can undo that affect on my global scope?

#

I use eslint, but maybe it has something like that