js-api-loader icon indicating copy to clipboard operation
js-api-loader copied to clipboard

Question getting type returned from Loader

Open captDaylight opened this issue 3 years ago • 0 comments

I'm using a state library that will hold the dynamically loaded google api to use across many components.

// I have something like this
export const googleVar = makeVar<any>(null);

// but I want something like this
export const googleVar = makeVar<Google | null>(null);

I've followed the steps and installed DefinitelyTyped's types. However I don't know the best way to import the global return type for loader.load.

captDaylight avatar Oct 14 '22 20:10 captDaylight