You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm running into weirdness trying to import the lib in order to use the programmatic API (docs). using:
importdtsgenerator,{parseSchema}from'dtsgenerator';// same result using: import { default as dtsgenerator, parseSchema } from 'dtsgenerator';// ...asyncfunctiongenerateWithDTSGen(destination: string,schema){constoutput=awaitdtsgenerator.default({contents: [parseSchema(schema),],config: {plugins: {'@dtsgenerator/single-quote': true,'@dtsgenerator/replace-namespace': {map: [{from: ['Components','Schemas'],to: ['API','Entities'],},],},},},});awaitfs.outputFile(destination,output);}
my script runs and produces expected output but i get a typescript error:
bin/generate-api-types.ts:30:36 - error TS2339: Property 'default' does not exist on type '(options: Options) => Promise<string>'.
30 const output = await dtsgenerator.default({
~~~~~~~
Found 1 error in bin/generate-api-types.ts:30
how should i be importing things?
The text was updated successfully, but these errors were encountered:
hey there 👋
i'm running into weirdness trying to
import
the lib in order to use the programmatic API (docs). using:my script runs and produces expected output but i get a typescript error:
how should i be importing things?
The text was updated successfully, but these errors were encountered: