@statoscope/helpers
Advanced tools
Comparing version 5.28.0 to 5.28.1
import { Data } from 'archy'; | ||
export declare type Node = Data; | ||
export type Node = Data; | ||
export default function makeTree(node: Data, prefix?: string): string; |
export declare function normalizeId<TID>(id: TID): TID | string; | ||
export declare type IDModifier<TID> = (id: TID) => TID; | ||
export type IDModifier<TID> = (id: TID) => TID; | ||
export declare function getIdWrapper<TID, TEntity>(getId: GetIDFn<TID, TEntity>, idModifier?: IDModifier<TID>): GetIDFn<TID | string, TEntity>; | ||
export declare type Entities<TEntity> = TEntity[] | Set<TEntity> | Map<unknown, TEntity> | Record<string, TEntity>; | ||
export declare type ResolverAPI = { | ||
export type Entities<TEntity> = TEntity[] | Set<TEntity> | Map<unknown, TEntity> | Record<string, TEntity>; | ||
export type ResolverAPI = { | ||
lock(): void; | ||
unlock(): void; | ||
}; | ||
export declare type ResolverFn<TID, TReturn> = (id: TID) => TReturn | null; | ||
export declare type Resolver<TID, TReturn> = ResolverFn<TID, TReturn> & ResolverAPI; | ||
export declare type GetIDFn<TID, TEntity> = (entity: TEntity) => TID; | ||
export type ResolverFn<TID, TReturn> = (id: TID) => TReturn | null; | ||
export type Resolver<TID, TReturn> = ResolverFn<TID, TReturn> & ResolverAPI; | ||
export type GetIDFn<TID, TEntity> = (entity: TEntity) => TID; | ||
export default function makeResolver<TID, TEntity, TReturn = TEntity>(entities: Entities<TEntity>, getId: (entity: TEntity) => TID, get?: ((entity: TEntity) => TReturn) | null, locked?: boolean): Resolver<TID, TReturn>; |
import Node from './node'; | ||
export { Node }; | ||
export declare type PathSolution<TData> = { | ||
export type PathSolution<TData> = { | ||
node: Node<TData>; | ||
@@ -5,0 +5,0 @@ children: PathSolution<TData>[]; |
import { GetIDFn, IDModifier } from './entity-resolver'; | ||
export declare type IndexAPI<TID, TEntity> = { | ||
export type IndexAPI<TID, TEntity> = { | ||
add(entity: TEntity): void; | ||
@@ -11,3 +11,3 @@ has(entity: TEntity): boolean; | ||
}; | ||
export declare type IndexOptions<TID> = { | ||
export type IndexOptions<TID> = { | ||
idModifier?: IDModifier<TID>; | ||
@@ -14,0 +14,0 @@ }; |
@@ -7,3 +7,3 @@ export declare function generateColor(str: string): string; | ||
}; | ||
export declare type ColorMap = { | ||
export type ColorMap = { | ||
[key: string]: { | ||
@@ -10,0 +10,0 @@ color: string; |
@@ -32,3 +32,3 @@ import { Range, SemVer } from 'semver'; | ||
} | ||
export declare type Limit = { | ||
export type Limit = { | ||
type: 'absolute'; | ||
@@ -40,7 +40,7 @@ number: number; | ||
}; | ||
export declare type ValueDiff = { | ||
export type ValueDiff = { | ||
absolute: number; | ||
percent: number; | ||
}; | ||
export declare type SerializedStringOrRegexp = { | ||
export type SerializedStringOrRegexp = { | ||
type: 'string'; | ||
@@ -53,3 +53,3 @@ content: string; | ||
}; | ||
export declare type DiffItem = TimeDiffItem | SizeDiffItem | NumberDiffItem | VersionDiffItem; | ||
export type DiffItem = TimeDiffItem | SizeDiffItem | NumberDiffItem | VersionDiffItem; | ||
export default function helpers(): { | ||
@@ -104,8 +104,8 @@ stringify: { | ||
}; | ||
export declare type Prepared = { | ||
export type Prepared = { | ||
query: (query: string, data?: unknown, context?: unknown) => unknown; | ||
}; | ||
export declare type Options = { | ||
export type Options = { | ||
helpers?: Record<string, unknown>; | ||
}; | ||
export declare function prepareWithJora(input: unknown, options?: Options): Prepared; |
@@ -1,3 +0,3 @@ | ||
export declare type PluralFn = (value: number, words: string[]) => string; | ||
export declare type PluralType = { | ||
export type PluralFn = (value: number, words: string[]) => string; | ||
export type PluralType = { | ||
plural: PluralFn; | ||
@@ -4,0 +4,0 @@ pluralWithValue(value: number, words: string[]): string; |
@@ -1,2 +0,2 @@ | ||
export declare type Item = { | ||
export type Item = { | ||
type: string; | ||
@@ -3,0 +3,0 @@ name: string; |
{ | ||
"name": "@statoscope/helpers", | ||
"version": "5.28.0", | ||
"version": "5.28.1", | ||
"description": "Statoscope utils", | ||
@@ -10,4 +10,3 @@ "main": "./dist/index.js", | ||
"scripts": { | ||
"build": "../../node_modules/.bin/tsc", | ||
"prepublishOnly": "npm run build" | ||
"build": "../../node_modules/.bin/tsc" | ||
}, | ||
@@ -23,8 +22,8 @@ "repository": "https://github.com/statoscope/statoscope.git", | ||
"@types/archy": "^0.0.32", | ||
"@types/semver": "^7.3.10", | ||
"@types/semver": "^7.5.1", | ||
"archy": "~1.0.0", | ||
"jora": "1.0.0-beta.8", | ||
"semver": "^7.3.7" | ||
"semver": "^7.5.4" | ||
}, | ||
"gitHead": "8593d1728fba7201855ba496eb5c01d28333c60b" | ||
"gitHead": "a89f68a6251a1c914791e22b643dd94ca2a70253" | ||
} |
35935
Updated@types/semver@^7.5.1
Updatedsemver@^7.5.4