
Security News
Socket Integrates With Bun 1.3’s Security Scanner API
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
@skypilot/common-types
Advanced tools
A library of reusable common types for TypeScript projects
interface Class<T> extends Function {
new(...args: any[]): T
}
type Enum<E> = Record<keyof E, number | string> & { [key: number]: string }
type Primitive = boolean | number | string;
interface DefiniteJsonArray extends Array<DefiniteJsonValue> {}
type DefiniteJsonMap = {
[key: string]: DefiniteJsonArray | DefiniteJsonMap | JsonPrimitive;
}
type DefiniteJsonValue = DefiniteJsonArray | DefiniteJsonMap | JsonPrimitive;
interface JsonArray extends Array<JsonValue> {}
type JsonMap = {
[key: string]: JsonArray | JsonMap | JsonPrimitive | undefined;
}
type JsonPrimitive = boolean | number | string | null;
type JsonValue = JsonArray | JsonMap | JsonPrimitive | undefined;
These types provide semantic value only. (Until TypeScript allows pattern-matching, the patterns these types imply will not be enforced.)
type Email = string
type Integer = number
type Json = string
type Timestamp = Integer
type Url = string
AtLeastOne<T>
: constructs a type that requires at least one property of T
ExactlyOne<T>
: constructs a type that requires exactly one property of T
Maybe<T>
: constructs a type that allows T
, null
, or undefined
MaybeNull<T>
: constructs a type that allows T
or null
MaybeReadOnly<T>
: constructs a type that allows T[]
or readonly T[]
MaybeUndefined<T>
: constructs a type that allows T
or undefined
Require<T, Required>
[DEPRECATED in favor of RequireProps
]: constructs a type that makes the
Required
properties of T
required
RequireProps<T, Required>
: constructs a type that makes the Required
properties of T
required
FAQs
Library of reusable common types for TypeScript projects
The npm package @skypilot/common-types receives a total of 112 weekly downloads. As such, @skypilot/common-types popularity was classified as not popular.
We found that @skypilot/common-types demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.
Security News
Former RubyGems maintainers have launched The Gem Cooperative, a new community-run project aimed at rebuilding open governance in the Ruby ecosystem.