mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-10-28 21:49:49 +00:00
Move to @pezkuwi/dev 0.86 (eslint 10 toolchain)
- @pezkuwi/dev, dev-test, dev-ts ^0.86.3; disable directives renamed for the new rule names, or removed where the rule no longer reports - rethrown errors carry the original as `cause` (13 sites) - optional chains where a guard expression tested the same value - Init: the registry cache settles with the creator's own promise, dropping the entry in finally(), instead of re-wrapping it - Combinator: a typed call instead of `Function` - checkTypes.manual: synchronous checks run outside Promise.all - sortValues, createTypeUnsafe: initial values that were never read - typegen util: load docs.js for its side effect (it registers the `docs` Handlebars partial) now that its types are re-exported type-only - MockProvider keeps its Header assertion: the package's own build does not load api-augment, so createType returns a plain Codec there - Decorate keeps `delete queue[i]`: the hole marks a fired queue and later indexes must not shift
This commit is contained in:
1 parent
8c9af013b5
commit
60e0f73ffa
166 files changed
+2757
-3731
No files matched your search
@@ -120,7 +120,7 @@ const infoMapping: Record<TypeDefInfo, (registry: Registry, value: TypeDef) => C
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
Clazz.prototype.toRawType = function (): string {
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call
|
||||
return `Linkage<${this.next.toRawType(true)}>`;
|
||||
};
|
||||
|
||||
@@ -155,7 +155,6 @@ const infoMapping: Record<TypeDefInfo, (registry: Registry, value: TypeDef) => C
|
||||
[TypeDefInfo.Result]: (_registry: Registry, value: TypeDef): CodecClass<Codec> => {
|
||||
const [Ok, Err] = getTypeClassArray(value);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
return Result.with({ Err, Ok });
|
||||
},
|
||||
|
||||
@@ -233,7 +232,7 @@ export function constructTypeClass<T extends Codec = Codec> (registry: Registry,
|
||||
|
||||
return Type as CodecClass<T>;
|
||||
} catch (error) {
|
||||
throw new Error(`Unable to construct class from ${stringify(typeDef)}: ${(error as Error).message}`);
|
||||
throw new Error(`Unable to construct class from ${stringify(typeDef)}: ${(error as Error).message}`, { cause: error });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ function initType<T extends Codec> (registry: Registry, Type: CodecClass, params
|
||||
// runtime error.
|
||||
export function createTypeUnsafe<T extends Codec = Codec, K extends string = string> (registry: Registry, type: K, params: unknown[] = [], options: CreateOptions = {}): T {
|
||||
let Clazz: CodecClass | null = null;
|
||||
let firstError: Error | null = null;
|
||||
let firstError: Error;
|
||||
|
||||
try {
|
||||
Clazz = createClassUnsafe(registry, type);
|
||||
|
||||
@@ -7,5 +7,5 @@ import './augmentRegistry.js';
|
||||
export type { CodecCreateOptions as CreateOptions } from '@pezkuwi/types-codec/types';
|
||||
|
||||
// all starred
|
||||
export * from './lookup.js';
|
||||
export type * from './lookup.js';
|
||||
export * from './types.js';
|
||||
Reference in new issue
Block a user