I'm new to Typescript so please forgive my simple question.
Using the Airtable npm library, I want to import the different types into my project. I've imported the @types/airtable npm module but I can't seem to import them.
This is my code:
import Airtable, { Base } from "airtable";
const base : Base = Airtable.base("xxx");
VSCode shows the following error:
'Base' refers to a value, but is being used as a type here. Did you mean 'typeof Base'?ts(2749)
When I try changing it to typeof Base
the type shows as any
so that can't be it.
If you you leave the type off, what does it show in the tooltip for base? It should do type inference, if Airtable is showing up as namespace, i'd think that const base = Airtable.base("xxx");
would do type inference.