Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlsh committed Mar 6, 2024
1 parent ad0ae9c commit 38c4444
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/lib/src/gir-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import type {
ParsedGir,
GirInfoAttrs,
GenerateConfig,
IntrospectedFunctionParameter,
IntrospectedClassFunction,
PromisifyFunc,
} from './types/index.js'
import {
Expand All @@ -52,6 +50,8 @@ import {
IntrospectedFunction,
IntrospectedCallback,
IntrospectedClassCallback,
IntrospectedFunctionParameter,
IntrospectedClassFunction,
} from './gir/function.js'
import { NSRegistry } from './gir/registry.js'
import { isPrimitiveType } from './gir/util.js'
Expand Down Expand Up @@ -319,7 +319,7 @@ export class GirModule {
}
}
}

overloadPromisifiedFunctions(girFunctions: GirFunctionElement[]): void {
if (!this.config.promisify) return

Expand Down Expand Up @@ -632,10 +632,9 @@ export class GirModule {
(m): m is IntrospectedBaseClass => m instanceof IntrospectedBaseClass,
)
const res = clazzes
.map<[IntrospectedBaseClass, IntrospectedClassCallback | undefined]>((m) => [
m,
m.callbacks.find((c) => c.name === name || c.resolve_names.includes(name)),
])
.map<
[IntrospectedBaseClass, IntrospectedClassCallback | undefined]
>((m) => [m, m.callbacks.find((c) => c.name === name || c.resolve_names.includes(name))])
.find((r): r is [IntrospectedBaseClass, IntrospectedClassCallback] => r[1] != null)

if (res) {
Expand Down

0 comments on commit 38c4444

Please sign in to comment.