![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@typed/core
Advanced tools
Readme
Shared kernel of types for Typed organization
yarn add @typed/core
# or
npm install --save @typed/core
All functions are curried!
export type Arity0<A> = () => A
export type Arity1<A, B> = (value: A) => B
export type Arity10<A, B, C, D, E, F, G, H, I, J, K> = (
a: A,
b: B,
c: C,
d: D,
e: E,
f: F,
g: G,
h: H,
i: I,
j: J
) => K
export type Arity10N<A, B, C, D, E, F, G, H, I, J, R> = (
a: A,
b: B,
c: C,
d: D,
e: E,
f: F,
g: G,
h: H,
i: I,
j: J,
...args: Array<any>
) => R
export type Arity1Bound<that, A, B> = (this: that, a: A) => B
export type Arity1N<A, R> = (a: A, ...args: Array<any>) => R
export type Arity2<A, B, C> = (a: A, b: B) => C
export type Arity2Bound<that, A, B, C> = (this: that, a: A, b: B) => C
export type Arity2N<A, B, R> = (a: A, b: B, ...args: Array<any>) => R
export type Arity3<A, B, C, D> = (a: A, b: B, c: C) => D
export type Arity3Bound<that, A, B, C, D> = (this: that, a: A, b: B, c: C) => D
export type Arity3N<A, B, C, R> = (a: A, b: B, c: C, ...args: Array<any>) => R
export type Arity4<A, B, C, D, E> = (a: A, b: B, c: C, d: D) => E
export type Arity4Bound<that, A, B, C, D, E> = (this: that, a: A, b: B, c: C, d: D) => E
export type Arity4N<A, B, C, D, R> = (a: A, b: B, c: C, d: D, ...args: Array<any>) => R
export type Arity5<A, B, C, D, E, F> = (a: A, b: B, c: C, d: D, e: E) => F
export type Arity5Bound<that, A, B, C, D, E, F> = (this: that, a: A, b: B, c: C, d: D, e: E) => F
export type Arity5N<A, B, C, D, E, R> = (a: A, b: B, c: C, d: D, e: E, ...args: Array<any>) => R
export type Arity6<A, B, C, D, E, F, G> = (a: A, b: B, c: C, d: D, e: E, f: F) => G
export type Arity6N<A, B, C, D, E, F, R> = (
a: A,
b: B,
c: C,
d: D,
e: E,
f: F,
...args: Array<any>
) => R
export type Arity7<A, B, C, D, E, F, G, H> = (a: A, b: B, c: C, d: D, e: E, f: F, g: G) => H
export type Arity7N<A, B, C, D, E, F, G, R> = (
a: A,
b: B,
c: C,
d: D,
e: E,
f: F,
g: G,
...args: Array<any>
) => R
export type Arity8<A, B, C, D, E, F, G, H, I> = (
a: A,
b: B,
c: C,
d: D,
e: E,
f: F,
g: G,
h: H
) => I
export type Arity8N<A, B, C, D, E, F, G, H, R> = (
a: A,
b: B,
c: C,
d: D,
e: E,
f: F,
g: G,
h: H,
...args: Array<any>
) => R
export type Arity9<A, B, C, D, E, F, G, H, I, J> = (
a: A,
b: B,
c: C,
d: D,
e: E,
f: F,
g: G,
h: H,
i: I
) => J
export type Arity9N<A, B, C, D, E, F, G, H, I, R> = (
a: A,
b: B,
c: C,
d: D,
e: E,
f: F,
g: G,
h: H,
i: I,
...args: Array<any>
) => R
export type ArityN<R> = (...args: Array<any>) => R
export type Comparator<A> = (a: A, b: A) => ComparisonNumbers
export type ComparisonNumbers = -1 | 0 | 1
export type Curry10<A, B, C, D, E, F, G, H, I, J, K> = {
(a: A): Curry9<B, C, D, E, F, G, H, I, J, K>
(a: A, b: B): Curry8<C, D, E, F, G, H, I, J, K>
(a: A, b: B, c: C): Curry7<D, E, F, G, H, I, J, K>
(a: A, b: B, c: C, d: D): Curry6<E, F, G, H, I, J, K>
(a: A, b: B, c: C, d: D, e: E): Curry5<F, G, H, I, J, K>
(a: A, b: B, c: C, d: D, e: E, f: F): Curry4<G, H, I, J, K>
(a: A, b: B, c: C, d: D, e: E, f: F, g: G): Curry3<H, I, J, K>
(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H): Curry2<I, J, K>
(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I): Arity1<J, K>
(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J): K
}
export type Curry2<A, B, C> = {
(a: A): Arity1<B, C>
(a: A, b: B): C
}
export type Curry3<A, B, C, D> = {
(a: A): Curry2<B, C, D>
(a: A, b: B): Arity1<C, D>
(a: A, b: B, c: C): D
}
export type Curry4<A, B, C, D, E> = {
(a: A): Curry3<B, C, D, E>
(a: A, b: B): Curry2<C, D, E>
(a: A, b: B, c: C): Arity1<D, E>
(a: A, b: B, c: C, d: D): E
}
export type Curry5<A, B, C, D, E, F> = {
(a: A): Curry4<B, C, D, E, F>
(a: A, b: B): Curry3<C, D, E, F>
(a: A, b: B, c: C): Curry2<D, E, F>
(a: A, b: B, c: C, d: D): Arity1<E, F>
(a: A, b: B, c: C, d: D, e: E): F
}
export type Curry6<A, B, C, D, E, F, G> = {
(a: A): Curry5<B, C, D, E, F, G>
(a: A, b: B): Curry4<C, D, E, F, G>
(a: A, b: B, c: C): Curry3<D, E, F, G>
(a: A, b: B, c: C, d: D): Curry2<E, F, G>
(a: A, b: B, c: C, d: D, e: E): Arity1<F, G>
(a: A, b: B, c: C, d: D, e: E, f: F): G
}
export type Curry7<A, B, C, D, E, F, G, H> = {
(a: A): Curry6<B, C, D, E, F, G, H>
(a: A, b: B): Curry5<C, D, E, F, G, H>
(a: A, b: B, c: C): Curry4<D, E, F, G, H>
(a: A, b: B, c: C, d: D): Curry3<E, F, G, H>
(a: A, b: B, c: C, d: D, e: E): Curry2<F, G, H>
(a: A, b: B, c: C, d: D, e: E, f: F): Arity1<G, H>
(a: A, b: B, c: C, d: D, e: E, f: F, g: G): H
}
export type Curry8<A, B, C, D, E, F, G, H, I> = {
(a: A): Curry7<B, C, D, E, F, G, H, I>
(a: A, b: B): Curry6<C, D, E, F, G, H, I>
(a: A, b: B, c: C): Curry5<D, E, F, G, H, I>
(a: A, b: B, c: C, d: D): Curry4<E, F, G, H, I>
(a: A, b: B, c: C, d: D, e: E): Curry3<F, G, H, I>
(a: A, b: B, c: C, d: D, e: E, f: F): Curry2<G, H, I>
(a: A, b: B, c: C, d: D, e: E, f: F, g: G): Arity1<H, I>
(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H): I
}
export type Curry9<A, B, C, D, E, F, G, H, I, J> = {
(a: A): Curry8<B, C, D, E, F, G, H, I, J>
(a: A, b: B): Curry7<C, D, E, F, G, H, I, J>
(a: A, b: B, c: C): Curry6<D, E, F, G, H, I, J>
(a: A, b: B, c: C, d: D): Curry5<E, F, G, H, I, J>
(a: A, b: B, c: C, d: D, e: E): Curry4<F, G, H, I, J>
(a: A, b: B, c: C, d: D, e: E, f: F): Curry3<G, H, I, J>
(a: A, b: B, c: C, d: D, e: E, f: F, g: G): Curry2<H, I, J>
(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H): Arity1<I, J>
(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I): J
}
Either data structure. Extremely useful for handling errors or different logic paths without the use of if-statements.
export type Either<A, B> = Left<A> | Right<B>
Fork function signature used by Future.
export type Fork<A, B> = (reject: (value: A) => void, resolve: (value: B) => void) => void
Asynchronous data-structure similar to a Promise, but lazy.
export interface Future<A, B> {
readonly fork: Fork<A, B>
}
A type-alias for numbers representing a List index
export type Index = number
A JSON-serializable Just data-structure
export interface Just<A> {
readonly '@typed/Just': A
}
A JSON-serializable Left<A> data-structure.
export interface Left<A> {
readonly '@typed/Left': A
}
An immutable List type.
export interface List<A> {
readonly [key: number]: A
readonly length: number
}
Maybe type. Very useful when errors can occur.
export type Maybe<A> = Just<A> | Nothing
The Nothing type, used in place of nulls or undefined.
export interface Nothing {
readonly '@typed/Nothing': true
}
export type Predicate<A> = (value: A) => boolean
export type Predicate2<A> = (a: A, b: A) => boolean
A JSON-serializable Right data-structure.
export interface Right<A> {
readonly '@typed/Right': A
}
FAQs
> WIP
The npm package @typed/core receives a total of 316 weekly downloads. As such, @typed/core popularity was classified as not popular.
We found that @typed/core demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.