TS2665

Invalid module name in augmentation. Module 'gas-local' resolves to an untyped module at '../node_modules/gas-local/index.js', which cannot be augmented.

Broken Code ❌

main.ts
declare module 'gas-local';
import gas from 'gas-local';
 
const glib = gas.require('./src');

Fixed Code ✔️

You have to move the shorthand ambient module declaration from a ".ts" file into a ".d.ts" file:

types.d.ts
declare module 'gas-local';
main.ts
import gas from 'gas-local';
 
const glib = gas.require('./src');