Options
All
  • Public
  • Public/Protected
  • All
Menu

Package node

@typed/node

APIS that only work within Node

Index

Type aliases

ArgNameValues

ArgNameValues<A>: Partial<Exclude<{}[keyof A], number | Function>>

Type parameters

ArgParserName

ArgParserName<A>: A extends ArgParser<infer Name, any> ? Name : never

Type parameters

  • A

ArgParserNameValue

ArgParserNameValue<A>: A extends ArgParser<infer Name, infer Value> ? {} : never

Type parameters

  • A

ArgParserResultValue

ArgParserResultValue<A>: A extends ArgParserResult<any, infer R> ? R : never

Type parameters

  • A

ArgParserValue

ArgParserValue<A>: A extends ArgParser<any, infer Value> ? Value : never

Type parameters

  • A

ArgValues

ArgValues<A>: OrToAnd<ArgNameValues<A>> & { _: keyof string[]; help: boolean }

Type parameters

ChildProcessStdio

ChildProcessStdio: { stderr: MockReadable; stdin: MockWritable; stdout: MockReadable }

Type declaration

NodeCallback

NodeCallback<A>: (error: Error | null | undefined | void, value?: A) => void

Type parameters

  • A

Type declaration

    • (error: Error | null | undefined | void, value?: A): void
    • Parameters

      • error: Error | null | undefined | void
      • Optional value: A

      Returns void

NodeCallbackFn

NodeCallbackFn: { <A, B, C, D, E, F, G, R>(a: A, b: B, c: C, d: D, e: E, f: F, g: G, cb: NodeCallback<R>): void; <A, B, C, D, E, F, R>(a: A, b: B, c: C, d: D, e: E, f: F, cb: NodeCallback<R>): void; <A, B, C, D, E, R>(a: A, b: B, c: C, d: D, e: E, cb: NodeCallback<R>): void; <A, B, C, D, R>(a: A, b: B, c: C, d: D, cb: NodeCallback<R>): void; <A, B, C, R>(a: A, b: B, c: C, cb: NodeCallback<R>): void; <A, B, R>(a: A, b: B, cb: NodeCallback<R>): void; <A, R>(a: A, cb: NodeCallback<R>): void; <R>(cb: NodeCallback<R>): void }

Type declaration

    • <A, B, C, D, E, F, G, R>(a: A, b: B, c: C, d: D, e: E, f: F, g: G, cb: NodeCallback<R>): void
    • <A, B, C, D, E, F, R>(a: A, b: B, c: C, d: D, e: E, f: F, cb: NodeCallback<R>): void
    • <A, B, C, D, E, R>(a: A, b: B, c: C, d: D, e: E, cb: NodeCallback<R>): void
    • <A, B, C, D, R>(a: A, b: B, c: C, d: D, cb: NodeCallback<R>): void
    • <A, B, C, R>(a: A, b: B, c: C, cb: NodeCallback<R>): void
    • <A, B, R>(a: A, b: B, cb: NodeCallback<R>): void
    • <A, R>(a: A, cb: NodeCallback<R>): void
    • <R>(cb: NodeCallback<R>): void
    • Type parameters

      • A

      • B

      • C

      • D

      • E

      • F

      • G

      • R

      Parameters

      Returns void

    • Type parameters

      • A

      • B

      • C

      • D

      • E

      • F

      • R

      Parameters

      Returns void

    • Type parameters

      • A

      • B

      • C

      • D

      • E

      • R

      Parameters

      Returns void

    • Type parameters

      • A

      • B

      • C

      • D

      • R

      Parameters

      Returns void

    • Type parameters

      • A

      • B

      • C

      • R

      Parameters

      Returns void

    • Type parameters

      • A

      • B

      • R

      Parameters

      Returns void

    • Type parameters

      • A

      • R

      Parameters

      Returns void

    • Type parameters

      • R

      Parameters

      Returns void

ParseOptions

ParseOptions: { aliases?: keyof string[]; help?: undefined | string }

Type declaration

  • Optional Readonly aliases?: keyof string[]
  • Optional Readonly help?: undefined | string

Stdio

Stdio: { stderr: MockWritable; stdin: MockReadable; stdout: MockWritable }

Type declaration

Variables

Const arrowDown

arrowDown: "↓" = "↓"

Const arrowLeft

arrowLeft: "←" = "←"

Const arrowRight

arrowRight: "→" = "→"

Const arrowUp

arrowUp: "↑" = "↑"

Const bgBlack

bgBlack: (Anonymous function) = modifier([40, 49])

Const bgBlue

bgBlue: (Anonymous function) = modifier([44, 49])

Const bgCyan

bgCyan: (Anonymous function) = modifier([46, 49])

Const bgGreen

bgGreen: (Anonymous function) = modifier([42, 49])

Const bgMagenta

bgMagenta: (Anonymous function) = modifier([45, 49])

Const bgRed

bgRed: (Anonymous function) = modifier([41, 49])

Const bgWhite

bgWhite: (Anonymous function) = modifier([47, 49])

Const bgYellow

bgYellow: (Anonymous function) = modifier([43, 49])

Const black

black: (Anonymous function) = modifier([30, 39])

Const blue

blue: (Anonymous function) = modifier([34, 39])

Const bold

bold: (Anonymous function) = modifier([1, 22])

Const bullet

bullet: "●" = "●"

Const checkboxCircleOff

checkboxCircleOff: "Ⓘ" = "Ⓘ"

Const checkboxCircleOn

checkboxCircleOn: "ⓧ" = "ⓧ"

Const checkboxOff

checkboxOff: "☐" = "☐"

Const checkboxOn

checkboxOn: "☒" = "☒"

Const circle

circle: "◯" = "◯"

Const circleCircle

circleCircle: "ⓞ" = "ⓞ"

Const circleCross

circleCross: "ⓧ" = "ⓧ"

Const circleDotted

circleDotted: "◌" = "◌"

Const circleDouble

circleDouble: "◎" = "◎"

Const circleFilled

circleFilled: "◉" = "◉"

Const circlePipe

circlePipe: "Ⓘ" = "Ⓘ"

Const circleQuestionMark

circleQuestionMark: "?⃝" = "?⃝"

Const cross

cross: "✖" = "✖"

Const cyan

cyan: (Anonymous function) = modifier([36, 39])

Const dim

dim: (Anonymous function) = modifier([2, 22])

Const dot

dot: "․" = "․"

Const ellipsis

ellipsis: "…" = "…"

Const fiveEighths

fiveEighths: "⅝" = "⅝"

Const fiveSixths

fiveSixths: "⅚" = "⅚"

Const fourFifths

fourFifths: "⅘" = "⅘"

Const getBoolEnvVar

getBoolEnvVar: Arity1<string, boolean> = pipe(getEnvVar,isBoolean,withDefault<boolean>(false),)

Const gray

gray: (Anonymous function) = modifier([37, 39])

Const green

green: (Anonymous function) = modifier([32, 39])

Const hamburger

hamburger: "☰" = "☰"

Const heart

heart: "♥" = "♥"

Const hidden

hidden: (Anonymous function) = modifier([8, 28])

Const info

info: "ℹ" = "ℹ"

Const inverse

inverse: (Anonymous function) = modifier([7, 27])

Const isArgumentFlag

isArgumentFlag: (arg: string) => boolean = or(isNamedFlag, isAliasFlag)

Type declaration

    • (arg: string): boolean
    • Parameters

      • arg: string

      Returns boolean

Const italic

italic: (Anonymous function) = modifier([3, 23])

Const line

line: "─" = "─"

Const magenta

magenta: (Anonymous function) = modifier([35, 39])

Const mustache

mustache: "෴" = "෴"

Const oneEighth

oneEighth: "⅛" = "⅛"

Const oneFifth

oneFifth: "⅕" = "⅕"

Const oneHalf

oneHalf: "½" = "½"

Const oneNinth

oneNinth: "⅑" = "⅑"

Const oneQuarter

oneQuarter: "¼" = "¼"

Const oneSeventh

oneSeventh: "⅐" = "⅐"

Const oneSixth

oneSixth: "⅙" = "⅙"

Const oneTenth

oneTenth: "⅒" = "⅒"

Const oneThird

oneThird: "⅓" = "⅓"

Const play

play: "▶" = "▶"

Const pointer

pointer: "❯" = "❯"

Const pointerSmall

pointerSmall: "›" = "›"

Const questionMarkPrefix

questionMarkPrefix: "?⃝" = "?⃝"

Const radioOff

radioOff: "◯" = "◯"

Const radioOn

radioOn: "◉" = "◉"

Const red

red: (Anonymous function) = modifier([31, 39])

Const reset

reset: (Anonymous function) = modifier([0, 0])

Const sevenEighths

sevenEighths: "⅞" = "⅞"

Const smiley

smiley: "㋡" = "㋡"

Const square

square: "▇" = "▇"

Const squareSmall

squareSmall: "◻" = "◻"

Const squareSmallFilled

squareSmallFilled: "◼" = "◼"

Const star

star: "★" = "★"

Const strikethrough

strikethrough: (Anonymous function) = modifier([9, 29])

Const threeEighths

threeEighths: "⅜" = "⅜"

Const threeFifths

threeFifths: "⅗" = "⅗"

Const threeQuarters

threeQuarters: "¾" = "¾"

Const tick

tick: "✔" = "✔"

Const twoFifths

twoFifths: "⅖" = "⅖"

Const twoThirds

twoThirds: "⅔" = "⅔"

Const underline

underline: (Anonymous function) = modifier([4, 24])

Const warning

warning: "⚠" = "⚠"

Const white

white: (Anonymous function) = modifier([90, 39])

Const yellow

yellow: (Anonymous function) = modifier([33, 39])

Functions

createChildProcessStdio

createParser

createStdio

effectify

  • effectify<R>(fn: (cb: NodeCallback<R>) => void): () => Effects<never, Either<Error, R>>
  • effectify<A, R>(fn: (a: A, cb: NodeCallback<R>) => void): (a: A) => Effects<never, Either<Error, R>>
  • effectify<A, B, R>(fn: (a: A, b: B, cb: NodeCallback<R>) => void): (a: A, b: B) => Effects<never, Either<Error, R>>
  • effectify<A, B, C, R>(fn: (a: A, b: B, c: C, cb: NodeCallback<R>) => void): (a: A, b: B, c: C) => Effects<never, Either<Error, R>>
  • effectify<A, B, C, D, R>(fn: (a: A, b: B, c: C, d: D, cb: NodeCallback<R>) => void): (a: A, b: B, c: C, d: D) => Effects<never, Either<Error, R>>
  • effectify<A, B, C, D, E, R>(fn: (a: A, b: B, c: C, d: D, e: E, cb: NodeCallback<R>) => void): (a: A, b: B, c: C, d: D, e: E) => Effects<never, Either<Error, R>>
  • effectify<A, B, C, D, E, F, R>(fn: (a: A, b: B, c: C, d: D, e: E, f: F, cb: NodeCallback<R>) => void): (a: A, b: B, c: C, d: D, e: E, f: F) => Effects<never, Either<Error, R>>
  • effectify<A, B, C, D, E, F, G, R>(fn: (a: A, b: B, c: C, d: D, e: E, f: F, g: G, cb: NodeCallback<R>) => void): (a: A, b: B, c: C, d: D, e: E, f: F, g: G) => Effects<never, Either<Error, R>>

Const end

  • end(n: number): string

findNamedArg

  • findNamedArg(name: string, aliases: keyof string[], args: keyof string[]): Maybe<number>

findRemainingArgs

  • findRemainingArgs(usedIndexes: keyof number[]): Effects<ArgsEnv, { _: keyof string[] }>

futurify

  • futurify<R>(fn: (cb: NodeCallback<R>) => void): () => Future<never, Error, R>
  • futurify<A, R>(fn: (a: A, cb: NodeCallback<R>) => void): (a: A) => Future<never, Error, R>
  • futurify<A, B, R>(fn: (a: A, b: B, cb: NodeCallback<R>) => void): (a: A, b: B) => Future<never, Error, R>
  • futurify<A, B, C, R>(fn: (a: A, b: B, c: C, cb: NodeCallback<R>) => void): (a: A, b: B, c: C) => Future<never, Error, R>
  • futurify<A, B, C, D, R>(fn: (a: A, b: B, c: C, d: D, cb: NodeCallback<R>) => void): (a: A, b: B, c: C, d: D) => Future<never, Error, R>
  • futurify<A, B, C, D, E, R>(fn: (a: A, b: B, c: C, d: D, e: E, cb: NodeCallback<R>) => void): (a: A, b: B, c: C, d: D, e: E) => Future<never, Error, R>
  • futurify<A, B, C, D, E, F, R>(fn: (a: A, b: B, c: C, d: D, e: E, f: F, cb: NodeCallback<R>) => void): (a: A, b: B, c: C, d: D, e: E, f: F) => Future<never, Error, R>
  • futurify<A, B, C, D, E, F, G, R>(fn: (a: A, b: B, c: C, d: D, e: E, f: F, g: G, cb: NodeCallback<R>) => void): (a: A, b: B, c: C, d: D, e: E, f: F, g: G) => Future<never, Error, R>

getArgs

  • getArgs(): Effects<ArgsEnv, keyof string[]>

getEnvVar

  • getEnvVar(key: string): Maybe<string>

getPositionalArgumentValue

  • getPositionalArgumentValue(index: number, args: keyof string[]): Maybe<keyof [number, string]>

getRequiredEnvVar

  • getRequiredEnvVar(name: string): string

isAliasFlag

  • isAliasFlag(arg: string): boolean

isNamedFlag

  • isNamedFlag(arg: string): boolean

Const modifier

  • modifier(modifiers: keyof [number, number]): (Anonymous function)

parseArgs

parseBooleanArg

parseNumberArg

parseStringArg

readFile

runWithArgs

  • runWithArgs<E, A>(effect: Effects<E, A>, args: keyof string[]): Effects<Omit<E, "args">, A>

showHelp

  • showHelp<A>(applicationName: string, parsers: A): Effects<ArgsEnv, void>

Const start

  • start(n: number): string

strip

  • strip(str: string): string

writeFile

Generated using TypeDoc