Options
All
  • Public
  • Public/Protected
  • All
Menu

ts-primitives

Index

Type aliases

Listener

Listener<T>: [] | ((e: T) => void)

Type parameters

  • T

Variables

Const basename

basename: (path: string, ext?: string) => string

Type declaration

    • (path: string, ext?: string): string
    • Parameters

      • path: string
      • Optional ext: string

      Returns string

Const delimiter

delimiter: string

Const dirname

dirname: (path: string) => string

Type declaration

    • (path: string): string
    • Parameters

      • path: string

      Returns string

Const extname

extname: (path: string) => string

Type declaration

    • (path: string): string
    • Parameters

      • path: string

      Returns string

Const format

format: (pathObject: ParsedPath) => string

Type declaration

Const isAbsolute

isAbsolute: (path: string) => boolean

Type declaration

    • (path: string): boolean
    • Parameters

      • path: string

      Returns boolean

Const join

join: (...paths: string[]) => string

Type declaration

    • (...paths: string[]): string
    • Parameters

      • Rest ...paths: string[]

      Returns string

Const normalize

normalize: (path: string) => string

Type declaration

    • (path: string): string
    • Parameters

      • path: string

      Returns string

Const parse

parse: (path: string) => ParsedPath

Type declaration

Const posix

posix: IPath

Const relative

relative: (from: string, to: string) => string

Type declaration

    • (from: string, to: string): string
    • Parameters

      • from: string
      • to: string

      Returns string

Const resolve

resolve: (...pathSegments: string[]) => string

Type declaration

    • (...pathSegments: string[]): string
    • Parameters

      • Rest ...pathSegments: string[]

      Returns string

Const sep

sep: "\" | "/"

Const toNamespacedPath

toNamespacedPath: (path: string) => string

Type declaration

    • (path: string): string
    • Parameters

      • path: string

      Returns string

Const win32

win32: IPath

Functions

asPromise

  • Type parameters

    • T

    Parameters

    Returns Promise<T>

combinedDisposable

createCancelablePromise

disposableTimeout

  • disposableTimeout(handler: () => void, timeout?: number): IDisposable
  • Parameters

    • handler: () => void
        • (): void
        • Returns void

    • Optional timeout: number

    Returns IDisposable

dispose

  • dispose<T>(disposable: T): T
  • dispose<T>(disposable: T | undefined): T | undefined
  • dispose<T, A>(disposables: IterableIterator<T>): A
  • dispose<T>(disposables: Array<T>): Array<T>
  • dispose<T>(disposables: ReadonlyArray<T>): ReadonlyArray<T>
  • Type parameters

    Parameters

    • disposable: T

    Returns T

  • Type parameters

    Parameters

    • disposable: T | undefined

    Returns T | undefined

  • Type parameters

    Parameters

    • disposables: IterableIterator<T>

    Returns A

  • Type parameters

    Parameters

    • disposables: Array<T>

    Returns Array<T>

  • Type parameters

    Parameters

    • disposables: ReadonlyArray<T>

    Returns ReadonlyArray<T>

first

  • first<T>(promiseFactories: ITask<Promise<T>>[], shouldStop?: (t: T) => boolean, defaultValue?: T | null): Promise<T | null>
  • Type parameters

    • T

    Parameters

    • promiseFactories: ITask<Promise<T>>[]
    • Optional shouldStop: (t: T) => boolean
        • (t: T): boolean
        • Parameters

          • t: T

          Returns boolean

    • Optional defaultValue: T | null

    Returns Promise<T | null>

ignoreErrors

  • Type parameters

    • T

    Parameters

    Returns Promise<T | undefined>

isDisposable

  • isDisposable<E>(thing: E): thing is E & IDisposable
  • Type parameters

    • E: object

    Parameters

    • thing: E

    Returns thing is E & IDisposable

isThenable

  • isThenable<T>(obj: any): obj is Promise<T>
  • Type parameters

    • T

    Parameters

    • obj: any

    Returns obj is Promise<T>

raceCancellation

retry

  • Type parameters

    • T

    Parameters

    Returns Promise<T>

sequence

  • Runs the provided list of promise factories in sequential order. The returned promise will complete to an array of results from each promise.

    Type parameters

    • T

    Parameters

    Returns Promise<T[]>

setDisposableTracker

setGlobalLeakWarningThreshold

  • setGlobalLeakWarningThreshold(n: number): IDisposable
  • Parameters

    • n: number

    Returns IDisposable

timeout

toDisposable

  • Parameters

    • fn: () => void
        • (): void
        • Returns void

    Returns IDisposable

trackDisposable

  • trackDisposable<T>(x: T): T
  • Type parameters

    Parameters

    • x: T

    Returns T

uriToFsPath

  • uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string
  • Compute fsPath for the given uri

    Parameters

    • uri: URI
    • keepDriveLetterCasing: boolean

    Returns string

Generated using TypeDoc