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
fix: improve type safety in team.ts, remove any usages (closes#554) (#581)
* fix: improve type safety in team.ts, remove any usages (closes#554)
* fix: resolve broken test suite from team.ts type-safety refactor
- Add authenticate decorator inside buildApp() before app.register(teamRoutes),
since Fastify executes plugin registration during app.ready() — decorator
must exist before routes are registered, not after buildApp() returns
- Remove redundant .bind(app) calls in team.ts; authenticate decorator
doesn't use 'this', consistent with auth.ts pattern
- Cast payload via 'as typeof request.user' to satisfy TS in test mock
* fix: resolve lint/type errors blocking team.ts type-safety PR
- Add authenticate decorator inside buildApp() before app.register(teamRoutes);
Fastify executes plugin registration during app.ready(), so the decorator
must exist before routes are registered
- Remove redundant .bind(app) in team.ts; authenticate decorator doesn't use 'this'
- Fix eslint errors in team.test.ts: type-only imports, import order, const
over let, missing curly braces (mostly via --fix)
- Add explicit return type to createTeam test helper
- Add 'this: void' to authenticate's type signature in fastify.d.ts so
@typescript-eslint/unbound-method allows referencing it without binding
- Remove duplicate authenticate declaration in prisma.ts (method-shorthand
syntax with implicit bound this) that was silently conflicting with the
fastify.d.ts declaration — tsc merged them without error since the call
signatures were structurally compatible, but eslint's unbound-method
rule was still resolving to the unbound declaration
* chore: remove unused import
* Update team.ts
This PR also refactor functions name.
Signed-off-by: Yachika Sharma <shakuntalaramphalsharma@gmail.com>
---------
Signed-off-by: Yachika Sharma <shakuntalaramphalsharma@gmail.com>
0 commit comments