Options
All
  • Public
  • Public/Protected
  • All
Menu

@stoplight/types

Common typings for the Stoplight ecosystem.

Installation

Supported in modern browsers and node.

# latest stable
yarn add -D @stoplight/types

Contributing

  1. Clone repo.
  2. Create / checkout feature/{name}, chore/{name}, or fix/{name} branch.
  3. Install deps: yarn.
  4. Make your changes.
  5. Run tests: yarn test.prod.
  6. Stage relevant files to git.
  7. Commit: yarn commit. NOTE: Commits that don't follow the conventional format will be rejected. yarn commit creates this format for you, or you can put it together manually and then do a regular git commit.
  8. Push: git push.
  9. Open PR targeting the next branch.

Index

Type aliases

DeepPartial

DeepPartial: object

Like Partial but recursive

Type declaration

DeepReadonly

DeepReadonly: DeepReadonly<T>

Like Readonly but recursive

DiagnosticTag

DiagnosticTag: string

Dictionary

Dictionary: object

Dictionaries related

Type declaration

DictionaryValues

DictionaryValues: DictionaryValues<T>

DocumentUri

DocumentUri: string

ExtendedHttpMethod

ExtendedHttpMethod: HttpMethod | "copy" | "link" | "unlink" | "purge" | "lock" | "unlock"

GetJsonPathForPosition

GetJsonPathForPosition: function

Type declaration

GetLocationForJsonPath

GetLocationForJsonPath: function

Type declaration

HttpMethod

HttpMethod: "get" | "post" | "put" | "patch" | "delete" | "head" | "options"

HttpNameValue

HttpNameValue: Dictionary<string, string>

HttpNameValues

HttpNameValues: Dictionary<string[], string>

HttpSecurityScheme

HTTP Security

JsonPath

JsonPath: Segment[]

Omit

Omit: Pick<T, Exclude<keyof T, K>>

Omit given key in object type

Opaque

Opaque: T & object

Easy create opaque types ie. types that are subset of their original types (ex: positive numbers, uppercased string)

Optional

Optional: T | undefined

Primitive

Primitive: string | number | boolean | undefined | null

Essentials

Segment

Segment: string | number

SourceMapParser

SourceMapParser: function

Type declaration