Skip to content

Commit 9e74a3e

Browse files
committed
feature: @putout/plugin-printer: check-type-passed-to-type-checker: exclude: +/-
1 parent 2ab0c15 commit 9e74a3e

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const isSimple = createTypeChecker([
2+
['+: node.value -> +'],
3+
['+: node.value -> -'],
4+
]);

packages/plugin-printer/lib/check-type-passed-to-type-checker/index.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,8 @@ test('printer: check-type-passed-to-type-checker: no report: arrow', (t) => {
4646
t.noReport('arrow');
4747
t.end();
4848
});
49+
50+
test('printer: check-type-passed-to-type-checker: no report: boolean', (t) => {
51+
t.noReport('boolean');
52+
t.end();
53+
});

packages/plugin-printer/lib/types.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ import {types} from 'putout';
22

33
const TYPES_EXISTS = new Set([
44
'CommentBlock',
5+
'+',
6+
'-',
57
]);
68

7-
const TYPES_NOT_EXISTS = new Set(['ExportDeclaration']);
9+
const TYPES_NOT_EXISTS = new Set([
10+
'ExportDeclaration',
11+
]);
812

913
export function isTypeExists(type) {
1014
if (TYPES_NOT_EXISTS.has(type))

0 commit comments

Comments
 (0)