@inquirer/core
Advanced tools
@@ -1,4 +0,11 @@ | ||
| import { type Prompt, type Prettify } from '@inquirer/type'; | ||
| type ViewFunction<Value, Config> = (config: Prettify<Config>, done: (value: Value) => void) => string | [string, string | undefined]; | ||
| export declare function createPrompt<Value, Config>(view: ViewFunction<Value, Config>): Prompt<Value, Config>; | ||
| import { type Prompt } from '@inquirer/type'; | ||
| type ViewFunction<Value, Config> = (config: Config, done: (value: Value) => void) => string | [string, string | undefined]; | ||
| /** | ||
| * Expand the top-level keys of a type for better IDE display, without | ||
| * recursing into nested fields (so generic values stay compatible). | ||
| */ | ||
| type ShallowPrettify<T> = { | ||
| [K in keyof T]: T[K]; | ||
| } & {}; | ||
| export declare function createPrompt<Value, Config>(view: ViewFunction<Value, Config>): Prompt<Value, ShallowPrettify<Config> & Config>; | ||
| export {}; |
@@ -31,3 +31,4 @@ import { getDefaultTheme } from "./theme.js"; | ||
| ]; | ||
| // oxlint-disable-next-line typescript/no-unsafe-type-assertion | ||
| return deepMerge(...themesToMerge); | ||
| } |
@@ -1,2 +0,1 @@ | ||
| import type { Prettify } from '@inquirer/type'; | ||
| export declare function usePagination<T>({ items, active, renderItem, pageSize, loop, }: { | ||
@@ -7,7 +6,7 @@ items: ReadonlyArray<T>; | ||
| /** Renders an item as part of a page. */ | ||
| renderItem: (layout: Prettify<{ | ||
| renderItem: (layout: { | ||
| item: T; | ||
| index: number; | ||
| isActive: boolean; | ||
| }>) => string; | ||
| }) => string; | ||
| /** The size of the page. */ | ||
@@ -14,0 +13,0 @@ pageSize: number; |
@@ -163,5 +163,5 @@ import type { Prettify } from '@inquirer/type'; | ||
| }; | ||
| export type Theme<Extension extends object = object> = Prettify<Extension & DefaultTheme>; | ||
| export type Theme<Extension extends object = object> = Extension & DefaultTheme; | ||
| export declare const defaultTheme: DefaultTheme; | ||
| export declare function getDefaultTheme(): DefaultTheme; | ||
| export {}; |
+3
-3
| { | ||
| "name": "@inquirer/core", | ||
| "version": "12.0.0", | ||
| "version": "12.0.1", | ||
| "description": "Core Inquirer prompt API", | ||
@@ -72,3 +72,3 @@ "keywords": [ | ||
| "@inquirer/figures": "^2.0.8", | ||
| "@inquirer/type": "^4.0.7", | ||
| "@inquirer/type": "^4.1.0", | ||
| "cli-width": "^4.1.0", | ||
@@ -98,3 +98,3 @@ "fast-wrap-ansi": "^0.2.0", | ||
| "types": "./dist/index.d.ts", | ||
| "gitHead": "999706755afbdcae271f62decbd9bcd05560905b" | ||
| "gitHead": "51ac389603405e8f9f315ce49416153d95c5fefe" | ||
| } |
59597
0.36%1110
0.63%Updated