You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@inquirer/type

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inquirer/type - npm Package Compare versions

Comparing version
4.0.0
to
4.0.1
+7
-12
package.json
{
"name": "@inquirer/type",
"version": "4.0.0",
"version": "4.0.1",
"description": "Inquirer core TS types",

@@ -56,3 +56,6 @@ "keywords": [

"./package.json": "./package.json",
".": "./src/index.ts"
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},

@@ -66,3 +69,2 @@ "files": [

"devDependencies": {
"@repo/tsconfig": "0.0.0",
"typescript": "^5.9.3"

@@ -82,12 +84,5 @@ },

"publishConfig": {
"access": "public",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
"access": "public"
},
"gitHead": "676685d33374a30340c1b9f0831c7eae2b2357dd"
"gitHead": "cce79ce3b9bbdfb4dbb798078cf3b94b9adc7d1b"
}
export * from './inquirer.ts';
export * from './utils.ts';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./inquirer.js"), exports);
__exportStar(require("./utils.js"), exports);
import { Duplex } from 'node:stream';
/**
* `InquirerReadline` is a re-implementation of `readline.Interface` from Node.js.
* We're reimplementing it because of 3 reasons:
* 1. The `readline.Interface` API is not complete; it's missing for example `clearLine`.
* 2. The input/output streams are not generics, meaning they're inexact.
* 3. Since ReadLine isn't built-in Typescript Global NodeJS type, it'd force us to ship `@types/node` as a dependency to all users.
*/
export type InquirerReadline = {
output: Duplex & {
mute: () => void;
unmute: () => void;
};
input: NodeJS.ReadableStream;
clearLine: (dir: 0 | 1 | -1) => void;
getCursorPos: () => {
rows: number;
cols: number;
};
setPrompt: (prompt: string) => void;
line: string;
write: (data: string) => void;
on: (event: string, listener: (...args: unknown[]) => void) => void;
removeListener: (event: string, listener: (...args: unknown[]) => void) => void;
pause: () => void;
resume: () => void;
close: () => void;
};
export type Context = {
input?: NodeJS.ReadableStream;
output?: NodeJS.WritableStream;
clearPromptOnDone?: boolean;
signal?: AbortSignal;
};
export type Prompt<Value, Config> = (config: Config, context?: Context) => Promise<Value> & {
/** @deprecated pass an AbortSignal in the context options instead. See {@link https://github.com/SBoudrias/Inquirer.js#canceling-prompt} */
cancel: () => void;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
{
"type": "commonjs"
}
type Key = string | number | symbol;
export type Prettify<T> = {
[K in keyof T]: T[K];
} & {};
export type PartialDeep<T> = T extends object ? {
[P in keyof T]?: PartialDeep<T[P]>;
} : T;
export type LiteralUnion<T extends F, F = string> = T | (F & {});
export type KeyUnion<T> = LiteralUnion<Extract<keyof T, string>>;
export type DistributiveMerge<A, B> = A extends any ? Prettify<Omit<A, keyof B> & B> : never;
export type UnionToIntersection<T> = (T extends any ? (input: T) => void : never) extends (input: infer Intersection) => void ? Intersection : never;
/**
* @hidden
*/
type __Pick<O extends object, K extends keyof O> = {
[P in K]: O[P];
} & {};
/**
* @hidden
*/
export type _Pick<O extends object, K extends Key> = __Pick<O, keyof O & K>;
/**
* Extract out of `O` the fields of key `K`
* @param O to extract from
* @param K to chose fields
* @returns [[Object]]
*/
export type Pick<O extends object, K extends Key> = O extends unknown ? _Pick<O, K> : never;
export {};
"use strict";
/* eslint-disable @typescript-eslint/no-explicit-any */
Object.defineProperty(exports, "__esModule", { value: true });
export * from './inquirer.ts';
export * from './utils.ts';
export * from "./inquirer.js";
export * from "./utils.js";
import { Duplex } from 'node:stream';
/**
* `InquirerReadline` is a re-implementation of `readline.Interface` from Node.js.
* We're reimplementing it because of 3 reasons:
* 1. The `readline.Interface` API is not complete; it's missing for example `clearLine`.
* 2. The input/output streams are not generics, meaning they're inexact.
* 3. Since ReadLine isn't built-in Typescript Global NodeJS type, it'd force us to ship `@types/node` as a dependency to all users.
*/
export type InquirerReadline = {
output: Duplex & {
mute: () => void;
unmute: () => void;
};
input: NodeJS.ReadableStream;
clearLine: (dir: 0 | 1 | -1) => void;
getCursorPos: () => {
rows: number;
cols: number;
};
setPrompt: (prompt: string) => void;
line: string;
write: (data: string) => void;
on: (event: string, listener: (...args: unknown[]) => void) => void;
removeListener: (event: string, listener: (...args: unknown[]) => void) => void;
pause: () => void;
resume: () => void;
close: () => void;
};
export type Context = {
input?: NodeJS.ReadableStream;
output?: NodeJS.WritableStream;
clearPromptOnDone?: boolean;
signal?: AbortSignal;
};
export type Prompt<Value, Config> = (config: Config, context?: Context) => Promise<Value> & {
/** @deprecated pass an AbortSignal in the context options instead. See {@link https://github.com/SBoudrias/Inquirer.js#canceling-prompt} */
cancel: () => void;
};
{
"type": "module"
}
type Key = string | number | symbol;
export type Prettify<T> = {
[K in keyof T]: T[K];
} & {};
export type PartialDeep<T> = T extends object ? {
[P in keyof T]?: PartialDeep<T[P]>;
} : T;
export type LiteralUnion<T extends F, F = string> = T | (F & {});
export type KeyUnion<T> = LiteralUnion<Extract<keyof T, string>>;
export type DistributiveMerge<A, B> = A extends any ? Prettify<Omit<A, keyof B> & B> : never;
export type UnionToIntersection<T> = (T extends any ? (input: T) => void : never) extends (input: infer Intersection) => void ? Intersection : never;
/**
* @hidden
*/
type __Pick<O extends object, K extends keyof O> = {
[P in K]: O[P];
} & {};
/**
* @hidden
*/
export type _Pick<O extends object, K extends Key> = __Pick<O, keyof O & K>;
/**
* Extract out of `O` the fields of key `K`
* @param O to extract from
* @param K to chose fields
* @returns [[Object]]
*/
export type Pick<O extends object, K extends Key> = O extends unknown ? _Pick<O, K> : never;
export {};
/* eslint-disable @typescript-eslint/no-explicit-any */
export {};