Skip to content

modern ts#28997

Merged
chrisnojima merged 8 commits intonojima/HOTPOT-next-670-cleanfrom
nojima/HOTPOT-modern-ts
Mar 8, 2026
Merged

modern ts#28997
chrisnojima merged 8 commits intonojima/HOTPOT-next-670-cleanfrom
nojima/HOTPOT-modern-ts

Conversation

@chrisnojima
Copy link
Contributor

No description provided.

Replace type annotations with satisfies on const object literals across
constants/fs.tsx, stores, and other config objects. This preserves
narrower literal types while still validating structure at compile time.
Replace new Promise((resolve, reject) => { ... }) constructor pattern
with Promise.withResolvers() in 5 files. This flattens the code by
removing one level of nesting in callback-heavy async code.
Convert type-annotated const objects in button.tsx, icon2.tsx,
avatar, router options, and inbox-rows to use satisfies.
…esolvers

The installer errorTypes with satisfies narrowed booleans to literal
false, causing lint errors. Reverted to type annotation.

Promise.withResolvers<void>() triggers no-invalid-void-type lint rule.
Changed to <undefined> and updated resolve() calls to resolve(undefined).
Relax no-invalid-void-type to allow void in all generic type arguments
(was only Promise). Promise.withResolvers<void>() still triggers the
rule since it's a method call not a type, so use <undefined> there.
if (waitingKey) {
getEngine().dispatchWaitingAction(waitingKey, true)
}
const {promise, resolve, reject} = Promise.withResolvers()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • test rn

# Conflicts:
#	shared/common-adapters/icon2.tsx
Reverts back to new Promise((resolve, reject) => {...}) pattern
in all 5 files that were converted.
@chrisnojima chrisnojima merged commit c3bd31f into nojima/HOTPOT-next-670-clean Mar 8, 2026
1 check was pending
@chrisnojima chrisnojima deleted the nojima/HOTPOT-modern-ts branch March 8, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant