Skip to content

Instantly share code, notes, and snippets.

@anythingcodes
Last active March 2, 2022 15:14
// lib/util.js - Untyped JavaScript file
export const somethingAwesome = makeSomethingAwesome();
export const hof = fn => fn(somethingSpecial() as MyInternalType)
// app/index.ts - TypeScript file
// @ts-ignore Add types for util dependency
import { somethingAwesome, hof } from 'lib/util';
hof((input: never) => { /* ... */ });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment