Skip to content

Commit

Permalink
Merge pull request #1829 from vega/next
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
domoritz authored Dec 5, 2023
2 parents 404ea5e + f5cb7c0 commit 16f29a1
Show file tree
Hide file tree
Showing 4 changed files with 359 additions and 383 deletions.
2 changes: 1 addition & 1 deletion src/NodeParser/NumberTypeNodeParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { NumberType } from "../Type/NumberType";

export class NumberTypeNodeParser implements SubNodeParser {
public supportsNode(node: ts.KeywordTypeNode): boolean {
return node.kind === ts.SyntaxKind.NumberKeyword;
return node.kind === ts.SyntaxKind.NumberKeyword || node.kind === ts.SyntaxKind.BigIntKeyword;
}
public createType(node: ts.KeywordTypeNode, context: Context): BaseType {
return new NumberType();
Expand Down
1 change: 1 addition & 0 deletions test/valid-data/type-primitives/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export interface MyObject {
boolean: boolean;
number: number;
string: string;
bigint: bigint;

integer: integer;
double: double;
Expand Down
4 changes: 4 additions & 0 deletions test/valid-data/type-primitives/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@
},
"string": {
"type": "string"
},
"bigint": {
"type": "number"
}
},
"required": [
"boolean",
"number",
"string",
"bigint",
"integer",
"double",
"decimal",
Expand Down
Loading

0 comments on commit 16f29a1

Please sign in to comment.