Skip to content

Commit

Permalink
fix(generators): better types for enabled methods (#3474)
Browse files Browse the repository at this point in the history
  • Loading branch information
AshotN authored May 3, 2024
1 parent 44d4b09 commit bdb3d3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/generators/src/service/templates/service.tpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion packages/generators/src/service/templates/shared.tpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit bdb3d3a

Please sign in to comment.