Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Move to bigint from Long #209

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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