Skip to content

Commit

Permalink
feat: Move to bigint from Long (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Nikitin committed Jan 16, 2024
2 parents 74c7a60 + 9cb2150 commit 3469c70
Show file tree
Hide file tree
Showing 59 changed files with 173 additions and 303 deletions.
2 changes: 1 addition & 1 deletion buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins:
- plugin: buf.build/community/stephenh-ts-proto
out: ./
opt:
- forceLong=long
- forceLong=bigint
- esModuleInterop=true
- emitImportedFiles=true
- exportCommonSymbols=false
Expand Down
2 changes: 1 addition & 1 deletion cheqd/did/v1/common.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions cheqd/did/v1/common.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal.js";

export interface KeyValuePair {
Expand Down Expand Up @@ -81,10 +80,10 @@ export const KeyValuePair = {
},
};

type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;

type DeepPartial<T> = T extends Builtin ? T
: T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
Expand All @@ -93,11 +92,6 @@ type KeysOfUnion<T> = T extends T ? keyof T : never;
type Exact<P, I extends P> = P extends Builtin ? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };

if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}

function isSet(value: any): boolean {
return value !== null && value !== undefined;
}
2 changes: 1 addition & 1 deletion cheqd/did/v1/did.js.map

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions cheqd/did/v1/did.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal.js";
import { KeyValuePair } from "./common.js";

Expand Down Expand Up @@ -492,10 +491,10 @@ export const Service = {
},
};

type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;

type DeepPartial<T> = T extends Builtin ? T
: T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
Expand All @@ -504,11 +503,6 @@ type KeysOfUnion<T> = T extends T ? keyof T : never;
type Exact<P, I extends P> = P extends Builtin ? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };

if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}

function isSet(value: any): boolean {
return value !== null && value !== undefined;
}
2 changes: 1 addition & 1 deletion cheqd/did/v1/fee.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3469c70

Please sign in to comment.