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
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) {
}
}
The text was updated successfully, but these errors were encountered:
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?The text was updated successfully, but these errors were encountered: