( rootName: string, qualified: string | undefined | null, argNodes: readonly TSType[] | undefined, context: TypeContext, module: SourceModule, kindOfKey: KindOfKey, depth: number, typeArgs: TypeArgs | undefined, state: TypeEvalState )
| 2380 | |
| 2381 | // qualified: undefined for bare `Foo`, string for `NS.Foo`, null for deeper |
| 2382 | private namedTypeKindOf( |
| 2383 | rootName: string, |
| 2384 | qualified: string | undefined | null, |
| 2385 | argNodes: readonly TSType[] | undefined, |
| 2386 | context: TypeContext, |
| 2387 | module: SourceModule, |
| 2388 | kindOfKey: KindOfKey, |
| 2389 | depth: number, |
| 2390 | typeArgs: TypeArgs | undefined, |
| 2391 | state: TypeEvalState |
| 2392 | ): KindBits | undefined { |
| 2393 | // e.g. `T` in `<T extends Type>(t: T) => ...` |
| 2394 | if (qualified === undefined) { |
| 2395 | const parameter = typeParameterOf(context, rootName) |
| 2396 | if (parameter) { |
| 2397 | if (typeArgs?.has(parameter)) return typeArgs.get(parameter) |
| 2398 | return parameter.constraint ? |
| 2399 | this.typeKindOf( |
| 2400 | parameter.constraint, |
| 2401 | context, |
| 2402 | module, |
| 2403 | kindOfKey, |
| 2404 | depth, |
| 2405 | typeArgs, |
| 2406 | state |
| 2407 | ) |
| 2408 | : undefined |
| 2409 | } |
| 2410 | } |
| 2411 | const imported = importedNameOf(module, rootName) |
| 2412 | if (imported) { |
| 2413 | const [specifier, importedName] = imported |
| 2414 | if (localSpecifier.test(specifier)) { |
| 2415 | // e.g. `T.Options` for `import type * as T from "./types.ts"` |
| 2416 | const exportName = |
| 2417 | qualified === undefined ? importedName |
| 2418 | : typeof qualified === "string" && importedName === "*" ? qualified |
| 2419 | : undefined |
| 2420 | return exportName === undefined ? undefined : ( |
| 2421 | this.exportedTypeKindOf( |
| 2422 | specifier, |
| 2423 | exportName, |
| 2424 | context, |
| 2425 | module, |
| 2426 | kindOfKey, |
| 2427 | depth, |
| 2428 | argNodes, |
| 2429 | module, |
| 2430 | typeArgs, |
| 2431 | state |
| 2432 | ) |
| 2433 | ) |
| 2434 | } |
| 2435 | const isArkTypeName = |
| 2436 | qualified !== undefined ? |
| 2437 | typeof qualified === "string" && |
| 2438 | (importedName === "*" ? |
| 2439 | qualified in arkTypeNames |
no test coverage detected