Skip to content

Commit

Permalink
make is method optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetazzz committed Nov 19, 2023
1 parent e845821 commit f3bc51a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion __fixtures__/misc/output-impl-interfaces-gen/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class GlobalDecoderRegistry {
) {
const element = GlobalDecoderRegistry.registry[key];

if (element.is(obj)) {
if (element.is!(obj)) {
return element;
}

Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/misc/output-impl-interfaces-gen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface TelescopeGeneratedCodec<
> {
readonly typeUrl: string;
readonly aminoType?: string;
is(o: unknown): o is T;
is?(o: unknown): o is T;
isSDK?(o: unknown): o is SDK;
isAmino?(o: unknown): o is Amino;
encode: (message: T, writer?: IBinaryWriter | any) => IBinaryWriter | any;
Expand Down
2 changes: 1 addition & 1 deletion packages/telescope/src/helpers/registry-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class GlobalDecoderRegistry {
) {
const element = GlobalDecoderRegistry.registry[key];
if (element.is(obj)) {
if (element.is!(obj)) {
return element;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/telescope/src/helpers/types-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface TelescopeGeneratedCodec<
> {
readonly typeUrl: string;
readonly aminoType?: string;
is(o: unknown): o is T;
is?(o: unknown): o is T;
isSDK?(o: unknown): o is SDK;
isAmino?(o: unknown): o is Amino;
encode: (message: T, writer?: IBinaryWriter | any) => IBinaryWriter | any;
Expand Down

0 comments on commit f3bc51a

Please sign in to comment.