Hello! I have a trouble with your lib and hope for your help:
I get this error:
Error generate parameter method: 'AuthService.signIn' argument: ctx TypeError: Cannot read properties of undefined (reading 'filter')
When add types to controller's arguments.
For example, this is ok:
import { Path, POST } from 'typescript-rest';
@Path('auth')
export default class AuthService {
@POST
public signIn(ctx: object) {
}
}
But when I change ctx: object to ctx: Context:
import { Path, POST } from 'typescript-rest';
import { Context } from '../../utils';
@Path('auth')
export default class AuthService {
@POST
public signIn(ctx: Context) {
}
}
I get that error.
How can I fix it?
And I have question: why multiple arguments are forbidden? How can I user this lib when I need e.g. next function, like this?
import { Path, POST } from 'typescript-rest';
import { Context, Next } from '../../utils';
@Path('auth')
export default class AuthService {
@POST
public signIn(ctx: Context, next: Next) {
}
}
Hello! I have a trouble with your lib and hope for your help:
I get this error:
Error generate parameter method: 'AuthService.signIn' argument: ctx TypeError: Cannot read properties of undefined (reading 'filter')
When add types to controller's arguments.
For example, this is ok:
But when I change
ctx: object
toctx: Context
:I get that error.
How can I fix it?
And I have question: why multiple arguments are forbidden? How can I user this lib when I need e.g.
next
function, like this?