Skip to content

Commit

Permalink
Merge f8be800 into 8a7d7ca
Browse files Browse the repository at this point in the history
  • Loading branch information
horiuchi committed Jan 27, 2022
2 parents 8a7d7ca + f8be800 commit e0c8be3
Show file tree
Hide file tree
Showing 6 changed files with 317 additions and 164 deletions.
164 changes: 48 additions & 116 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"cross-env": "^7.0.3",
"eslint": "^8.7.0",
"husky": "^7.0.4",
"lint-staged": "^12.3.1",
"mocha": "^9.1.4",
"lint-staged": "^12.3.2",
"mocha": "^9.2.0",
"nyc": "^15.1.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.2",
Expand Down
11 changes: 11 additions & 0 deletions src/core/astBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ export function buildUnionTypeNode<T>(
return ts.factory.createParenthesizedType(node);
}

export function buildIntersectionTypeNode(
types: readonly ts.TypeNode[],
terminate: boolean
): ts.TypeNode {
const node = ts.factory.createIntersectionTypeNode(types);
if (terminate) {
return node;
}
return ts.factory.createParenthesizedType(node);
}

export function buildTupleTypeNode(
types: ts.TypeNode | ts.TypeNode[],
minItems?: number,
Expand Down

0 comments on commit e0c8be3

Please sign in to comment.