Closed khitrenovich closed 2 months ago
thanks @khitrenovich and we can add other functions as well,
declare module 'us-state-converter' { type StateInfo = { name: string; usps: string; demonym: string; iso: string; altAbbr: string[]; uscg: string; }; type Converter = (string) => StateInfo | undefined; const converter: Converter; export function fullName(string): string {} export function abbr(string): string {} export default converter; }
then import
import { fullName, abbr} from 'us-state-converter'
make pull request
@keveightysev Any chance to have this merged in? Would be valuable for the community
@khitrenovich @tharinduAppno @Dmitriyx @FrenchMajesty
Apologies for the delay on getting this added. I just published an update to NPM with the declaration file
Providing TS declaration would help a lot in adoption.
This is the basic
d.ts
I've used internally -