mirror of
https://github.com/feathersjs/feathers.git
synced 2026-02-01 17:37:38 +00:00
fix(generators): better types for enabled methods (#3474)
This commit is contained in:
parent
44d4b09550
commit
bdb3d3a308
@ -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'
|
||||
|
||||
@ -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')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user