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
PR #3562 migrated the test suite to TypeScript and got yarn test:typecheck to 0 errors with noImplicitAny: false in package/tsconfig.test.json. Flipping it to true exposes ~630 additional errors, all mechanical annotations on:
Destructured parameters in test helpers (e.g. renderComponent({ client, channel, props })).
Untyped let variables at describe scope (e.g. let chatClient without an annotation).
jest.fn() callback bodies.
All errors are in test files (plus one: src/components/Message/MessageItemView/utils/renderText.tsx where the untyped react-native-markdown-package import is currently handled via @ts-ignore).
Scope
Flip noImplicitAny: true in package/tsconfig.test.json (remove the TODO comment).
Follow-up to #3562.
Context
PR #3562 migrated the test suite to TypeScript and got
yarn test:typecheckto 0 errors withnoImplicitAny: falseinpackage/tsconfig.test.json. Flipping it totrueexposes ~630 additional errors, all mechanical annotations on:renderComponent({ client, channel, props })).letvariables at describe scope (e.g.let chatClientwithout an annotation).jest.fn()callback bodies.All errors are in test files (plus one:
src/components/Message/MessageItemView/utils/renderText.tsxwhere the untypedreact-native-markdown-packageimport is currently handled via@ts-ignore).Scope
noImplicitAny: trueinpackage/tsconfig.test.json(remove the TODO comment).stream-chat(StreamChat,Channel,LocalMessage,MessageResponse,UserResponse,ChannelMemberResponse, etc.).ComponentProps<typeof X>for render-helper prop args.anyandas any.as unknown as Tis acceptable where SDK type narrowing isn't possible.yarn test:typecheckat 0 errors.Out of scope (separate follow-ups)
package/src/store/apis/upsertDraft.ts:55—queries.concat(query)is a no-op; should bequeries.push(...query).MessageStatus.test.tsx—it.each('string', fn)was malformed; currentlyit.skip. Un-skip and rewrite as proper assertions.Acceptance
yarn test:typecheckpasses withnoImplicitAny: true.yarn test:unitsuite unchanged (same pre-existing SQLite-isolation flake, no new regressions).yarn buildandyarn lintunchanged.