chore: format and fix potential type errors
This commit is contained in:
parent
9b412a9404
commit
eed74947c3
4 changed files with 8 additions and 6 deletions
|
|
@ -39,9 +39,10 @@ export type WaitForModulesOptions<ReturnNamespace extends boolean = boolean> =
|
|||
export type WaitForModulesResult<
|
||||
F extends Filter,
|
||||
O extends WaitForModulesOptions,
|
||||
> = O extends RunFilterReturnExportsOptions<true>
|
||||
? MaybeDefaultExportMatched<FilterResult<F>>
|
||||
: FilterResult<F>
|
||||
> =
|
||||
O extends RunFilterReturnExportsOptions<true>
|
||||
? MaybeDefaultExportMatched<FilterResult<F>>
|
||||
: FilterResult<F>
|
||||
|
||||
/**
|
||||
* Wait for modules to initialize. **Callback won't be called if the module is already initialized!**
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export function getModuleDependencies(
|
|||
* @returns Non-zero number if the module is initialized, `0` if it is not initialized or does not exist.
|
||||
*/
|
||||
export function isModuleInitialized(id: Metro.ModuleID): number | undefined {
|
||||
// biome-ignore lint/suspicious/noNonNullAssertedOptionalChain: Hot path, undefined & <n> === 0
|
||||
return mList.get(id)?.flags! & Initialized
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ const DTAutoConnectSetting: SettingsItem = {
|
|||
useTitle: () => 'Auto-connect to DevTools',
|
||||
useDescription: () => 'Automatically connect to DevTools during startup.',
|
||||
useValue: () =>
|
||||
api.jsonStorage.use(s => s.devTools?.autoConnect !== undefined)!.devTools
|
||||
.autoConnect,
|
||||
api.jsonStorage.use(s => s.devTools?.autoConnect !== undefined)!
|
||||
.devTools.autoConnect,
|
||||
onValueChange: v => {
|
||||
api.jsonStorage.set({ devTools: { autoConnect: v } })
|
||||
},
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ const PlanConfirmAlertKey = 'repo-install-plan-confirm'
|
|||
export async function confirmPlan(plan: InstallPlan): Promise<boolean> {
|
||||
const repos = await listRepos()
|
||||
|
||||
let resolve: (value: boolean) => void
|
||||
let resolve!: (value: boolean) => void
|
||||
const promise = new Promise<boolean>(r => (resolve = r))
|
||||
|
||||
const summary = await Promise.all(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue