fix(generators): better types for enabled methods (#3474)

This commit is contained in:
Ashot Nazaryan 2024-05-03 08:13:52 -07:00 committed by GitHub
parent 44d4b09550
commit bdb3d3a308
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ ${
? `import { ${camelName}Path, ${camelName}Methods } from './${fileName}.shared'`
: `
export const ${camelName}Path = '${path}'
export const ${camelName}Methods = ['find', 'get', 'create', 'patch', 'remove'] as const`
export const ${camelName}Methods: Array<keyof ${className}> = ['find', 'get', 'create', 'patch', 'remove']`
}
export * from './${fileName}.class'

View File

@ -29,7 +29,7 @@ export type ${upperName}ClientService = Pick<
export const ${camelName}Path = '${path}'
export const ${camelName}Methods = ['find', 'get', 'create', 'patch', 'remove'] as const
export const ${camelName}Methods: Array<keyof ${className}> = ['find', 'get', 'create', 'patch', 'remove']
export const ${camelName}Client = (client: ClientApplication) => {
const connection = client.get('connection')