@signpostmarv/ts-assert 0.1.1--develop → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/FUNDING.yml +2 -0
- package/.github/workflows/ci.yml +25 -0
- package/README.md +65 -7
- package/generated/assertions.d.ts +520 -0
- package/generated/assertions.js +1037 -0
- package/lib/main.d.ts +269 -0
- package/lib/main.js +18 -0
- package/package.json +3 -2
- package/generated/assertions.ts +0 -2328
package/lib/main.d.ts
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { isExpression } from '../generated/assertions';
|
|
2
|
+
import ts, { FalseLiteral, Node, TrueLiteral, TypeNode } from 'typescript';
|
|
3
|
+
export declare function isBooleanLiteral(node: Node, type: boolean, message?: string | Error): asserts node is typeof type extends true ? TrueLiteral : FalseLiteral;
|
|
4
|
+
export declare function isTokenWithExpectedKind(maybe: Node, expected_kind: ts.SyntaxKind, message?: string | Error): asserts maybe is TypeNode & {
|
|
5
|
+
kind: typeof expected_kind;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: {
|
|
8
|
+
isBooleanLiteral: typeof isBooleanLiteral;
|
|
9
|
+
isTokenWithExpectedKind: typeof isTokenWithExpectedKind;
|
|
10
|
+
isAccessor: typeof import("../generated/assertions").isAccessor;
|
|
11
|
+
isArrayBindingElement: typeof import("../generated/assertions").isArrayBindingElement;
|
|
12
|
+
isArrayBindingPattern: typeof import("../generated/assertions").isArrayBindingPattern;
|
|
13
|
+
isArrayLiteralExpression: typeof import("../generated/assertions").isArrayLiteralExpression;
|
|
14
|
+
isArrayTypeNode: typeof import("../generated/assertions").isArrayTypeNode;
|
|
15
|
+
isArrowFunction: typeof import("../generated/assertions").isArrowFunction;
|
|
16
|
+
isAsExpression: typeof import("../generated/assertions").isAsExpression;
|
|
17
|
+
isAssertionExpression: typeof import("../generated/assertions").isAssertionExpression;
|
|
18
|
+
isAssertsKeyword: typeof import("../generated/assertions").isAssertsKeyword;
|
|
19
|
+
isAsteriskToken: typeof import("../generated/assertions").isAsteriskToken;
|
|
20
|
+
isAutoAccessorPropertyDeclaration: typeof import("../generated/assertions").isAutoAccessorPropertyDeclaration;
|
|
21
|
+
isAwaitExpression: typeof import("../generated/assertions").isAwaitExpression;
|
|
22
|
+
isAwaitKeyword: typeof import("../generated/assertions").isAwaitKeyword;
|
|
23
|
+
isBigIntLiteral: typeof import("../generated/assertions").isBigIntLiteral;
|
|
24
|
+
isBinaryExpression: typeof import("../generated/assertions").isBinaryExpression;
|
|
25
|
+
isBinaryOperatorToken: typeof import("../generated/assertions").isBinaryOperatorToken;
|
|
26
|
+
isBindingElement: typeof import("../generated/assertions").isBindingElement;
|
|
27
|
+
isBindingName: typeof import("../generated/assertions").isBindingName;
|
|
28
|
+
isBlock: typeof import("../generated/assertions").isBlock;
|
|
29
|
+
isBreakOrContinueStatement: typeof import("../generated/assertions").isBreakOrContinueStatement;
|
|
30
|
+
isBreakStatement: typeof import("../generated/assertions").isBreakStatement;
|
|
31
|
+
isBundle: typeof import("../generated/assertions").isBundle;
|
|
32
|
+
isCallChain: typeof import("../generated/assertions").isCallChain;
|
|
33
|
+
isCallExpression: typeof import("../generated/assertions").isCallExpression;
|
|
34
|
+
isCallLikeExpression: typeof import("../generated/assertions").isCallLikeExpression;
|
|
35
|
+
isCallSignatureDeclaration: typeof import("../generated/assertions").isCallSignatureDeclaration;
|
|
36
|
+
isCaseBlock: typeof import("../generated/assertions").isCaseBlock;
|
|
37
|
+
isCaseClause: typeof import("../generated/assertions").isCaseClause;
|
|
38
|
+
isCaseOrDefaultClause: typeof import("../generated/assertions").isCaseOrDefaultClause;
|
|
39
|
+
isCatchClause: typeof import("../generated/assertions").isCatchClause;
|
|
40
|
+
isClassDeclaration: typeof import("../generated/assertions").isClassDeclaration;
|
|
41
|
+
isClassElement: typeof import("../generated/assertions").isClassElement;
|
|
42
|
+
isClassExpression: typeof import("../generated/assertions").isClassExpression;
|
|
43
|
+
isClassLike: typeof import("../generated/assertions").isClassLike;
|
|
44
|
+
isClassStaticBlockDeclaration: typeof import("../generated/assertions").isClassStaticBlockDeclaration;
|
|
45
|
+
isColonToken: typeof import("../generated/assertions").isColonToken;
|
|
46
|
+
isCommaListExpression: typeof import("../generated/assertions").isCommaListExpression;
|
|
47
|
+
isComputedPropertyName: typeof import("../generated/assertions").isComputedPropertyName;
|
|
48
|
+
isConciseBody: typeof import("../generated/assertions").isConciseBody;
|
|
49
|
+
isConditionalExpression: typeof import("../generated/assertions").isConditionalExpression;
|
|
50
|
+
isConditionalTypeNode: typeof import("../generated/assertions").isConditionalTypeNode;
|
|
51
|
+
isConstructorDeclaration: typeof import("../generated/assertions").isConstructorDeclaration;
|
|
52
|
+
isConstructorTypeNode: typeof import("../generated/assertions").isConstructorTypeNode;
|
|
53
|
+
isConstructSignatureDeclaration: typeof import("../generated/assertions").isConstructSignatureDeclaration;
|
|
54
|
+
isContinueStatement: typeof import("../generated/assertions").isContinueStatement;
|
|
55
|
+
isDebuggerStatement: typeof import("../generated/assertions").isDebuggerStatement;
|
|
56
|
+
isDeclarationStatement: typeof import("../generated/assertions").isDeclarationStatement;
|
|
57
|
+
isDecorator: typeof import("../generated/assertions").isDecorator;
|
|
58
|
+
isDefaultClause: typeof import("../generated/assertions").isDefaultClause;
|
|
59
|
+
isDeleteExpression: typeof import("../generated/assertions").isDeleteExpression;
|
|
60
|
+
isDoStatement: typeof import("../generated/assertions").isDoStatement;
|
|
61
|
+
isDotDotDotToken: typeof import("../generated/assertions").isDotDotDotToken;
|
|
62
|
+
isElementAccessChain: typeof import("../generated/assertions").isElementAccessChain;
|
|
63
|
+
isElementAccessExpression: typeof import("../generated/assertions").isElementAccessExpression;
|
|
64
|
+
isEmptyBindingPattern: typeof import("../generated/assertions").isEmptyBindingPattern;
|
|
65
|
+
isEmptyStatement: typeof import("../generated/assertions").isEmptyStatement;
|
|
66
|
+
isEntityName: typeof import("../generated/assertions").isEntityName;
|
|
67
|
+
isEnumDeclaration: typeof import("../generated/assertions").isEnumDeclaration;
|
|
68
|
+
isEnumMember: typeof import("../generated/assertions").isEnumMember;
|
|
69
|
+
isEqualsGreaterThanToken: typeof import("../generated/assertions").isEqualsGreaterThanToken;
|
|
70
|
+
isExclamationToken: typeof import("../generated/assertions").isExclamationToken;
|
|
71
|
+
isExportAssignment: typeof import("../generated/assertions").isExportAssignment;
|
|
72
|
+
isExportDeclaration: typeof import("../generated/assertions").isExportDeclaration;
|
|
73
|
+
isExportSpecifier: typeof import("../generated/assertions").isExportSpecifier;
|
|
74
|
+
isExpression: typeof isExpression;
|
|
75
|
+
isExpressionStatement: typeof import("../generated/assertions").isExpressionStatement;
|
|
76
|
+
isExpressionWithTypeArguments: typeof import("../generated/assertions").isExpressionWithTypeArguments;
|
|
77
|
+
isExternalModuleReference: typeof import("../generated/assertions").isExternalModuleReference;
|
|
78
|
+
isForInitializer: typeof import("../generated/assertions").isForInitializer;
|
|
79
|
+
isForInStatement: typeof import("../generated/assertions").isForInStatement;
|
|
80
|
+
isForOfStatement: typeof import("../generated/assertions").isForOfStatement;
|
|
81
|
+
isForStatement: typeof import("../generated/assertions").isForStatement;
|
|
82
|
+
isFunctionDeclaration: typeof import("../generated/assertions").isFunctionDeclaration;
|
|
83
|
+
isFunctionExpression: typeof import("../generated/assertions").isFunctionExpression;
|
|
84
|
+
isFunctionTypeNode: typeof import("../generated/assertions").isFunctionTypeNode;
|
|
85
|
+
isGetAccessor: typeof import("../generated/assertions").isGetAccessor;
|
|
86
|
+
isGetAccessorDeclaration: typeof import("../generated/assertions").isGetAccessorDeclaration;
|
|
87
|
+
isHeritageClause: typeof import("../generated/assertions").isHeritageClause;
|
|
88
|
+
isIdentifier: typeof import("../generated/assertions").isIdentifier;
|
|
89
|
+
isIfStatement: typeof import("../generated/assertions").isIfStatement;
|
|
90
|
+
isImportAttribute: typeof import("../generated/assertions").isImportAttribute;
|
|
91
|
+
isImportAttributeName: typeof import("../generated/assertions").isImportAttributeName;
|
|
92
|
+
isImportAttributes: typeof import("../generated/assertions").isImportAttributes;
|
|
93
|
+
isImportClause: typeof import("../generated/assertions").isImportClause;
|
|
94
|
+
isImportDeclaration: typeof import("../generated/assertions").isImportDeclaration;
|
|
95
|
+
isImportEqualsDeclaration: typeof import("../generated/assertions").isImportEqualsDeclaration;
|
|
96
|
+
isImportSpecifier: typeof import("../generated/assertions").isImportSpecifier;
|
|
97
|
+
isImportTypeNode: typeof import("../generated/assertions").isImportTypeNode;
|
|
98
|
+
isIndexedAccessTypeNode: typeof import("../generated/assertions").isIndexedAccessTypeNode;
|
|
99
|
+
isIndexSignatureDeclaration: typeof import("../generated/assertions").isIndexSignatureDeclaration;
|
|
100
|
+
isInferTypeNode: typeof import("../generated/assertions").isInferTypeNode;
|
|
101
|
+
isInterfaceDeclaration: typeof import("../generated/assertions").isInterfaceDeclaration;
|
|
102
|
+
isIntersectionTypeNode: typeof import("../generated/assertions").isIntersectionTypeNode;
|
|
103
|
+
isJSDoc: typeof import("../generated/assertions").isJSDoc;
|
|
104
|
+
isJSDocAllType: typeof import("../generated/assertions").isJSDocAllType;
|
|
105
|
+
isJSDocAugmentsTag: typeof import("../generated/assertions").isJSDocAugmentsTag;
|
|
106
|
+
isJSDocAuthorTag: typeof import("../generated/assertions").isJSDocAuthorTag;
|
|
107
|
+
isJSDocCallbackTag: typeof import("../generated/assertions").isJSDocCallbackTag;
|
|
108
|
+
isJSDocClassTag: typeof import("../generated/assertions").isJSDocClassTag;
|
|
109
|
+
isJSDocDeprecatedTag: typeof import("../generated/assertions").isJSDocDeprecatedTag;
|
|
110
|
+
isJSDocEnumTag: typeof import("../generated/assertions").isJSDocEnumTag;
|
|
111
|
+
isJSDocFunctionType: typeof import("../generated/assertions").isJSDocFunctionType;
|
|
112
|
+
isJSDocImplementsTag: typeof import("../generated/assertions").isJSDocImplementsTag;
|
|
113
|
+
isJSDocLink: typeof import("../generated/assertions").isJSDocLink;
|
|
114
|
+
isJSDocLinkCode: typeof import("../generated/assertions").isJSDocLinkCode;
|
|
115
|
+
isJSDocLinkPlain: typeof import("../generated/assertions").isJSDocLinkPlain;
|
|
116
|
+
isJSDocMemberName: typeof import("../generated/assertions").isJSDocMemberName;
|
|
117
|
+
isJSDocNamepathType: typeof import("../generated/assertions").isJSDocNamepathType;
|
|
118
|
+
isJSDocNameReference: typeof import("../generated/assertions").isJSDocNameReference;
|
|
119
|
+
isJSDocNonNullableType: typeof import("../generated/assertions").isJSDocNonNullableType;
|
|
120
|
+
isJSDocNullableType: typeof import("../generated/assertions").isJSDocNullableType;
|
|
121
|
+
isJSDocOptionalType: typeof import("../generated/assertions").isJSDocOptionalType;
|
|
122
|
+
isJSDocOverloadTag: typeof import("../generated/assertions").isJSDocOverloadTag;
|
|
123
|
+
isJSDocOverrideTag: typeof import("../generated/assertions").isJSDocOverrideTag;
|
|
124
|
+
isJSDocParameterTag: typeof import("../generated/assertions").isJSDocParameterTag;
|
|
125
|
+
isJSDocPrivateTag: typeof import("../generated/assertions").isJSDocPrivateTag;
|
|
126
|
+
isJSDocPropertyLikeTag: typeof import("../generated/assertions").isJSDocPropertyLikeTag;
|
|
127
|
+
isJSDocPropertyTag: typeof import("../generated/assertions").isJSDocPropertyTag;
|
|
128
|
+
isJSDocProtectedTag: typeof import("../generated/assertions").isJSDocProtectedTag;
|
|
129
|
+
isJSDocPublicTag: typeof import("../generated/assertions").isJSDocPublicTag;
|
|
130
|
+
isJSDocReadonlyTag: typeof import("../generated/assertions").isJSDocReadonlyTag;
|
|
131
|
+
isJSDocReturnTag: typeof import("../generated/assertions").isJSDocReturnTag;
|
|
132
|
+
isJSDocSatisfiesTag: typeof import("../generated/assertions").isJSDocSatisfiesTag;
|
|
133
|
+
isJSDocSeeTag: typeof import("../generated/assertions").isJSDocSeeTag;
|
|
134
|
+
isJSDocSignature: typeof import("../generated/assertions").isJSDocSignature;
|
|
135
|
+
isJSDocTemplateTag: typeof import("../generated/assertions").isJSDocTemplateTag;
|
|
136
|
+
isJSDocThisTag: typeof import("../generated/assertions").isJSDocThisTag;
|
|
137
|
+
isJSDocThrowsTag: typeof import("../generated/assertions").isJSDocThrowsTag;
|
|
138
|
+
isJSDocTypedefTag: typeof import("../generated/assertions").isJSDocTypedefTag;
|
|
139
|
+
isJSDocTypeExpression: typeof import("../generated/assertions").isJSDocTypeExpression;
|
|
140
|
+
isJSDocTypeLiteral: typeof import("../generated/assertions").isJSDocTypeLiteral;
|
|
141
|
+
isJSDocTypeTag: typeof import("../generated/assertions").isJSDocTypeTag;
|
|
142
|
+
isJSDocUnknownTag: typeof import("../generated/assertions").isJSDocUnknownTag;
|
|
143
|
+
isJSDocUnknownType: typeof import("../generated/assertions").isJSDocUnknownType;
|
|
144
|
+
isJSDocVariadicType: typeof import("../generated/assertions").isJSDocVariadicType;
|
|
145
|
+
isJsxAttribute: typeof import("../generated/assertions").isJsxAttribute;
|
|
146
|
+
isJsxAttributeLike: typeof import("../generated/assertions").isJsxAttributeLike;
|
|
147
|
+
isJsxAttributes: typeof import("../generated/assertions").isJsxAttributes;
|
|
148
|
+
isJsxChild: typeof import("../generated/assertions").isJsxChild;
|
|
149
|
+
isJsxClosingElement: typeof import("../generated/assertions").isJsxClosingElement;
|
|
150
|
+
isJsxClosingFragment: typeof import("../generated/assertions").isJsxClosingFragment;
|
|
151
|
+
isJsxElement: typeof import("../generated/assertions").isJsxElement;
|
|
152
|
+
isJsxExpression: typeof import("../generated/assertions").isJsxExpression;
|
|
153
|
+
isJsxFragment: typeof import("../generated/assertions").isJsxFragment;
|
|
154
|
+
isJsxNamespacedName: typeof import("../generated/assertions").isJsxNamespacedName;
|
|
155
|
+
isJsxOpeningElement: typeof import("../generated/assertions").isJsxOpeningElement;
|
|
156
|
+
isJsxOpeningFragment: typeof import("../generated/assertions").isJsxOpeningFragment;
|
|
157
|
+
isJsxOpeningLikeElement: typeof import("../generated/assertions").isJsxOpeningLikeElement;
|
|
158
|
+
isJsxSelfClosingElement: typeof import("../generated/assertions").isJsxSelfClosingElement;
|
|
159
|
+
isJsxSpreadAttribute: typeof import("../generated/assertions").isJsxSpreadAttribute;
|
|
160
|
+
isJsxTagNameExpression: typeof import("../generated/assertions").isJsxTagNameExpression;
|
|
161
|
+
isJsxText: typeof import("../generated/assertions").isJsxText;
|
|
162
|
+
isLabeledStatement: typeof import("../generated/assertions").isLabeledStatement;
|
|
163
|
+
isLeftHandSideExpression: typeof import("../generated/assertions").isLeftHandSideExpression;
|
|
164
|
+
isLiteralExpression: typeof import("../generated/assertions").isLiteralExpression;
|
|
165
|
+
isLiteralTypeNode: typeof import("../generated/assertions").isLiteralTypeNode;
|
|
166
|
+
isMappedTypeNode: typeof import("../generated/assertions").isMappedTypeNode;
|
|
167
|
+
isMemberName: typeof import("../generated/assertions").isMemberName;
|
|
168
|
+
isMetaProperty: typeof import("../generated/assertions").isMetaProperty;
|
|
169
|
+
isMethodDeclaration: typeof import("../generated/assertions").isMethodDeclaration;
|
|
170
|
+
isMethodSignature: typeof import("../generated/assertions").isMethodSignature;
|
|
171
|
+
isMinusToken: typeof import("../generated/assertions").isMinusToken;
|
|
172
|
+
isMissingDeclaration: typeof import("../generated/assertions").isMissingDeclaration;
|
|
173
|
+
isModifier: typeof import("../generated/assertions").isModifier;
|
|
174
|
+
isModifierLike: typeof import("../generated/assertions").isModifierLike;
|
|
175
|
+
isModuleBlock: typeof import("../generated/assertions").isModuleBlock;
|
|
176
|
+
isModuleBody: typeof import("../generated/assertions").isModuleBody;
|
|
177
|
+
isModuleDeclaration: typeof import("../generated/assertions").isModuleDeclaration;
|
|
178
|
+
isModuleName: typeof import("../generated/assertions").isModuleName;
|
|
179
|
+
isModuleReference: typeof import("../generated/assertions").isModuleReference;
|
|
180
|
+
isNamedExportBindings: typeof import("../generated/assertions").isNamedExportBindings;
|
|
181
|
+
isNamedExports: typeof import("../generated/assertions").isNamedExports;
|
|
182
|
+
isNamedImportBindings: typeof import("../generated/assertions").isNamedImportBindings;
|
|
183
|
+
isNamedImports: typeof import("../generated/assertions").isNamedImports;
|
|
184
|
+
isNamedTupleMember: typeof import("../generated/assertions").isNamedTupleMember;
|
|
185
|
+
isNamespaceExport: typeof import("../generated/assertions").isNamespaceExport;
|
|
186
|
+
isNamespaceExportDeclaration: typeof import("../generated/assertions").isNamespaceExportDeclaration;
|
|
187
|
+
isNamespaceImport: typeof import("../generated/assertions").isNamespaceImport;
|
|
188
|
+
isNewExpression: typeof import("../generated/assertions").isNewExpression;
|
|
189
|
+
isNonNullChain: typeof import("../generated/assertions").isNonNullChain;
|
|
190
|
+
isNonNullExpression: typeof import("../generated/assertions").isNonNullExpression;
|
|
191
|
+
isNoSubstitutionTemplateLiteral: typeof import("../generated/assertions").isNoSubstitutionTemplateLiteral;
|
|
192
|
+
isNotEmittedStatement: typeof import("../generated/assertions").isNotEmittedStatement;
|
|
193
|
+
isNumericLiteral: typeof import("../generated/assertions").isNumericLiteral;
|
|
194
|
+
isObjectBindingPattern: typeof import("../generated/assertions").isObjectBindingPattern;
|
|
195
|
+
isObjectLiteralElement: typeof import("../generated/assertions").isObjectLiteralElement;
|
|
196
|
+
isObjectLiteralElementLike: typeof import("../generated/assertions").isObjectLiteralElementLike;
|
|
197
|
+
isObjectLiteralExpression: typeof import("../generated/assertions").isObjectLiteralExpression;
|
|
198
|
+
isOmittedExpression: typeof import("../generated/assertions").isOmittedExpression;
|
|
199
|
+
isOptionalTypeNode: typeof import("../generated/assertions").isOptionalTypeNode;
|
|
200
|
+
isParameter: typeof import("../generated/assertions").isParameter;
|
|
201
|
+
isParenthesizedExpression: typeof import("../generated/assertions").isParenthesizedExpression;
|
|
202
|
+
isParenthesizedTypeNode: typeof import("../generated/assertions").isParenthesizedTypeNode;
|
|
203
|
+
isPartiallyEmittedExpression: typeof import("../generated/assertions").isPartiallyEmittedExpression;
|
|
204
|
+
isPlusToken: typeof import("../generated/assertions").isPlusToken;
|
|
205
|
+
isPostfixUnaryExpression: typeof import("../generated/assertions").isPostfixUnaryExpression;
|
|
206
|
+
isPrefixUnaryExpression: typeof import("../generated/assertions").isPrefixUnaryExpression;
|
|
207
|
+
isPrivateIdentifier: typeof import("../generated/assertions").isPrivateIdentifier;
|
|
208
|
+
isPropertyAccessChain: typeof import("../generated/assertions").isPropertyAccessChain;
|
|
209
|
+
isPropertyAccessExpression: typeof import("../generated/assertions").isPropertyAccessExpression;
|
|
210
|
+
isPropertyAssignment: typeof import("../generated/assertions").isPropertyAssignment;
|
|
211
|
+
isPropertyDeclaration: typeof import("../generated/assertions").isPropertyDeclaration;
|
|
212
|
+
isPropertyName: typeof import("../generated/assertions").isPropertyName;
|
|
213
|
+
isPropertySignature: typeof import("../generated/assertions").isPropertySignature;
|
|
214
|
+
isQualifiedName: typeof import("../generated/assertions").isQualifiedName;
|
|
215
|
+
isQuestionDotToken: typeof import("../generated/assertions").isQuestionDotToken;
|
|
216
|
+
isQuestionToken: typeof import("../generated/assertions").isQuestionToken;
|
|
217
|
+
isRegularExpressionLiteral: typeof import("../generated/assertions").isRegularExpressionLiteral;
|
|
218
|
+
isRestTypeNode: typeof import("../generated/assertions").isRestTypeNode;
|
|
219
|
+
isReturnStatement: typeof import("../generated/assertions").isReturnStatement;
|
|
220
|
+
isSatisfiesExpression: typeof import("../generated/assertions").isSatisfiesExpression;
|
|
221
|
+
isSemicolonClassElement: typeof import("../generated/assertions").isSemicolonClassElement;
|
|
222
|
+
isSetAccessor: typeof import("../generated/assertions").isSetAccessor;
|
|
223
|
+
isSetAccessorDeclaration: typeof import("../generated/assertions").isSetAccessorDeclaration;
|
|
224
|
+
isShorthandPropertyAssignment: typeof import("../generated/assertions").isShorthandPropertyAssignment;
|
|
225
|
+
isSourceFile: typeof import("../generated/assertions").isSourceFile;
|
|
226
|
+
isSpreadAssignment: typeof import("../generated/assertions").isSpreadAssignment;
|
|
227
|
+
isSpreadElement: typeof import("../generated/assertions").isSpreadElement;
|
|
228
|
+
isStatement: typeof import("../generated/assertions").isStatement;
|
|
229
|
+
isStringLiteral: typeof import("../generated/assertions").isStringLiteral;
|
|
230
|
+
isSwitchStatement: typeof import("../generated/assertions").isSwitchStatement;
|
|
231
|
+
isSyntheticExpression: typeof import("../generated/assertions").isSyntheticExpression;
|
|
232
|
+
isTaggedTemplateExpression: typeof import("../generated/assertions").isTaggedTemplateExpression;
|
|
233
|
+
isTemplateExpression: typeof import("../generated/assertions").isTemplateExpression;
|
|
234
|
+
isTemplateHead: typeof import("../generated/assertions").isTemplateHead;
|
|
235
|
+
isTemplateLiteral: typeof import("../generated/assertions").isTemplateLiteral;
|
|
236
|
+
isTemplateLiteralToken: typeof import("../generated/assertions").isTemplateLiteralToken;
|
|
237
|
+
isTemplateLiteralTypeNode: typeof import("../generated/assertions").isTemplateLiteralTypeNode;
|
|
238
|
+
isTemplateLiteralTypeSpan: typeof import("../generated/assertions").isTemplateLiteralTypeSpan;
|
|
239
|
+
isTemplateMiddle: typeof import("../generated/assertions").isTemplateMiddle;
|
|
240
|
+
isTemplateSpan: typeof import("../generated/assertions").isTemplateSpan;
|
|
241
|
+
isTemplateTail: typeof import("../generated/assertions").isTemplateTail;
|
|
242
|
+
isThisTypeNode: typeof import("../generated/assertions").isThisTypeNode;
|
|
243
|
+
isThrowStatement: typeof import("../generated/assertions").isThrowStatement;
|
|
244
|
+
isTryStatement: typeof import("../generated/assertions").isTryStatement;
|
|
245
|
+
isTupleTypeNode: typeof import("../generated/assertions").isTupleTypeNode;
|
|
246
|
+
isTypeAliasDeclaration: typeof import("../generated/assertions").isTypeAliasDeclaration;
|
|
247
|
+
isTypeAssertionExpression: typeof import("../generated/assertions").isTypeAssertionExpression;
|
|
248
|
+
isTypeElement: typeof import("../generated/assertions").isTypeElement;
|
|
249
|
+
isTypeLiteralNode: typeof import("../generated/assertions").isTypeLiteralNode;
|
|
250
|
+
isTypeNode: typeof import("../generated/assertions").isTypeNode;
|
|
251
|
+
isTypeOfExpression: typeof import("../generated/assertions").isTypeOfExpression;
|
|
252
|
+
isTypeOnlyExportDeclaration: typeof import("../generated/assertions").isTypeOnlyExportDeclaration;
|
|
253
|
+
isTypeOnlyImportDeclaration: typeof import("../generated/assertions").isTypeOnlyImportDeclaration;
|
|
254
|
+
isTypeOnlyImportOrExportDeclaration: typeof import("../generated/assertions").isTypeOnlyImportOrExportDeclaration;
|
|
255
|
+
isTypeOperatorNode: typeof import("../generated/assertions").isTypeOperatorNode;
|
|
256
|
+
isTypeParameterDeclaration: typeof import("../generated/assertions").isTypeParameterDeclaration;
|
|
257
|
+
isTypePredicateNode: typeof import("../generated/assertions").isTypePredicateNode;
|
|
258
|
+
isTypeQueryNode: typeof import("../generated/assertions").isTypeQueryNode;
|
|
259
|
+
isTypeReferenceNode: typeof import("../generated/assertions").isTypeReferenceNode;
|
|
260
|
+
isUnionTypeNode: typeof import("../generated/assertions").isUnionTypeNode;
|
|
261
|
+
isVariableDeclaration: typeof import("../generated/assertions").isVariableDeclaration;
|
|
262
|
+
isVariableDeclarationList: typeof import("../generated/assertions").isVariableDeclarationList;
|
|
263
|
+
isVariableStatement: typeof import("../generated/assertions").isVariableStatement;
|
|
264
|
+
isVoidExpression: typeof import("../generated/assertions").isVoidExpression;
|
|
265
|
+
isWhileStatement: typeof import("../generated/assertions").isWhileStatement;
|
|
266
|
+
isWithStatement: typeof import("../generated/assertions").isWithStatement;
|
|
267
|
+
isYieldExpression: typeof import("../generated/assertions").isYieldExpression;
|
|
268
|
+
};
|
|
269
|
+
export default _default;
|
package/lib/main.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import generated, { isExpression, } from '../generated/assertions';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import ts from 'typescript';
|
|
4
|
+
export function isBooleanLiteral(node, type, message) {
|
|
5
|
+
isExpression(node, message);
|
|
6
|
+
assert.equal(node.kind, type ? ts.SyntaxKind.TrueKeyword : ts.SyntaxKind.FalseKeyword, message);
|
|
7
|
+
}
|
|
8
|
+
export function isTokenWithExpectedKind(maybe, expected_kind, message) {
|
|
9
|
+
assert.equal(ts.isToken(maybe), true, message);
|
|
10
|
+
assert.equal(ts.isTokenKind(maybe.kind), true, message);
|
|
11
|
+
assert.equal(maybe.kind, expected_kind, message);
|
|
12
|
+
}
|
|
13
|
+
export default {
|
|
14
|
+
...generated,
|
|
15
|
+
isBooleanLiteral,
|
|
16
|
+
isTokenWithExpectedKind,
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=main.js.map
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@signpostmarv/ts-assert",
|
|
4
4
|
"description": "TypeScript Assertions",
|
|
5
|
+
"license": "Apache-2.0",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
8
|
"url": "git+https://github.com/SignpostMarv/ts-assert.git"
|
|
@@ -10,7 +11,7 @@
|
|
|
10
11
|
"test": "ts-node ./tests.ts"
|
|
11
12
|
},
|
|
12
13
|
"exports": {
|
|
13
|
-
".": "./
|
|
14
|
+
".": "./lib/main.js"
|
|
14
15
|
},
|
|
15
16
|
"devDependencies": {
|
|
16
17
|
"@types/eslint": "^8.56.7",
|
|
@@ -26,5 +27,5 @@
|
|
|
26
27
|
"dependencies": {
|
|
27
28
|
"typescript": "^5.4.5"
|
|
28
29
|
},
|
|
29
|
-
"version": "0.1.
|
|
30
|
+
"version": "0.1.2"
|
|
30
31
|
}
|