Files
start-os/sdk/lib/util/index.ts
2024-03-23 09:03:56 -06:00

36 lines
922 B
TypeScript

import * as T from "../types"
import "./nullIfEmpty"
import "./fileHelper"
import "../store/getStore"
import "./deepEqual"
import "./deepMerge"
import "./Overlay"
import "./once"
export { GetServiceInterface, getServiceInterface } from "./getServiceInterface"
export { getServiceInterfaces } from "./getServiceInterfaces"
// prettier-ignore
export type FlattenIntersection<T> =
T extends ArrayLike<any> ? T :
T extends object ? {} & {[P in keyof T]: T[P]} :
T;
export type _<T> = FlattenIntersection<T>
export const isKnownError = (e: unknown): e is T.KnownError =>
e instanceof Object && ("error" in e || "error-code" in e)
declare const affine: unique symbol
export type Affine<A> = { [affine]: A }
type NeverPossible = { [affine]: string }
export type NoAny<A> = NeverPossible extends A
? keyof NeverPossible extends keyof A
? never
: A
: A
export { getDefaultString } from "./getDefaultString"