@signpostmarv/ts-assert 0.2.2 → 0.3.0
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/generated/assertions.d.ts +3 -1
- package/generated/assertions.js +4 -0
- package/lib/main.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessorDeclaration, ArrayBindingElement, ArrayBindingPattern, ArrayLiteralExpression, ArrayTypeNode, ArrowFunction, AsExpression, AssertionExpression, AssertsKeyword, AsteriskToken, AutoAccessorPropertyDeclaration, AwaitExpression, AwaitKeyword, BigIntLiteral, BinaryExpression, BinaryOperatorToken, BindingElement, BindingName, BindingPattern, Block, BreakOrContinueStatement, BreakStatement, Bundle, CallChain, CallExpression, CallLikeExpression, CallSignatureDeclaration, CaseBlock, CaseClause, CaseOrDefaultClause, CatchClause, ClassDeclaration, ClassElement, ClassExpression, ClassLikeDeclaration, ClassStaticBlockDeclaration, ColonToken, CommaListExpression, ComputedPropertyName, ConciseBody, ConditionalExpression, ConditionalTypeNode, ConstructorDeclaration, ConstructorTypeNode, ConstructSignatureDeclaration, ContinueStatement, DebuggerStatement, DeclarationStatement, Decorator, DefaultClause, DeleteExpression, DoStatement, DotDotDotToken, ElementAccessChain, ElementAccessExpression, EmptyStatement, EntityName, EnumDeclaration, EnumMember, EqualsGreaterThanToken, ExclamationToken, ExportAssignment, ExportDeclaration, ExportSpecifier, Expression, ExpressionStatement, ExpressionWithTypeArguments, ExternalModuleReference, ForInitializer, ForInStatement, ForOfStatement, ForStatement, FunctionDeclaration, FunctionExpression, FunctionTypeNode, GetAccessorDeclaration, HeritageClause, Identifier, IfStatement, ImportAttribute, ImportAttributeName, ImportAttributes, ImportClause, ImportDeclaration, ImportEqualsDeclaration, ImportSpecifier, ImportTypeNode, IndexedAccessTypeNode, IndexSignatureDeclaration, InferTypeNode, InterfaceDeclaration, IntersectionTypeNode, JSDoc, JSDocAllType, JSDocAugmentsTag, JSDocAuthorTag, JSDocCallbackTag, JSDocClassTag, JSDocDeprecatedTag, JSDocEnumTag, JSDocFunctionType, JSDocImplementsTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, JSDocMemberName, JSDocNamepathType, JSDocNameReference, JSDocNonNullableType, JSDocNullableType, JSDocOptionalType, JSDocOverloadTag, JSDocOverrideTag, JSDocParameterTag, JSDocPrivateTag, JSDocPropertyLikeTag, JSDocPropertyTag, JSDocProtectedTag, JSDocPublicTag, JSDocReadonlyTag, JSDocReturnTag, JSDocSatisfiesTag, JSDocSeeTag, JSDocSignature, JSDocTemplateTag, JSDocThisTag, JSDocThrowsTag, JSDocTypedefTag, JSDocTypeExpression, JSDocTypeLiteral, JSDocTypeTag, JSDocUnknownTag, JSDocUnknownType, JSDocVariadicType, JsxAttribute, JsxAttributeLike, JsxAttributes, JsxChild, JsxClosingElement, JsxClosingFragment, JsxElement, JsxExpression, JsxFragment, JsxNamespacedName, JsxOpeningElement, JsxOpeningFragment, JsxOpeningLikeElement, JsxSelfClosingElement, JsxSpreadAttribute, JsxTagNameExpression, JsxText, LabeledStatement, LeftHandSideExpression, LiteralExpression, LiteralTypeNode, MappedTypeNode, MemberName, MetaProperty, MethodDeclaration, MethodSignature, MinusToken, MissingDeclaration, Modifier, ModifierLike, ModuleBlock, ModuleBody, ModuleDeclaration, ModuleName, ModuleReference, NamedExportBindings, NamedExports, NamedImportBindings, NamedImports, NamedTupleMember, NamespaceExport, NamespaceExportDeclaration, NamespaceImport, NewExpression, Node, NonNullChain, NonNullExpression, NoSubstitutionTemplateLiteral, NotEmittedStatement, NumericLiteral, ObjectBindingPattern, ObjectLiteralElement, ObjectLiteralElementLike, ObjectLiteralExpression, OmittedExpression, OptionalTypeNode, ParameterDeclaration, ParenthesizedExpression, ParenthesizedTypeNode, PartiallyEmittedExpression, PlusToken, PostfixUnaryExpression, PrefixUnaryExpression, PrivateIdentifier, PropertyAccessChain, PropertyAccessExpression, PropertyAssignment, PropertyDeclaration, PropertyName, PropertySignature, QualifiedName, QuestionDotToken, QuestionToken, RegularExpressionLiteral, RestTypeNode, ReturnStatement, SatisfiesExpression, SemicolonClassElement, SetAccessorDeclaration, ShorthandPropertyAssignment, SourceFile, SpreadAssignment, SpreadElement, Statement, StringLiteral, SwitchStatement, SyntheticExpression, TaggedTemplateExpression, TemplateExpression, TemplateHead, TemplateLiteral, TemplateLiteralToken, TemplateLiteralTypeNode, TemplateLiteralTypeSpan, TemplateMiddle, TemplateSpan, TemplateTail, ThisTypeNode, ThrowStatement, TryStatement, TupleTypeNode, TypeAliasDeclaration, TypeAssertion, TypeElement, TypeLiteralNode, TypeNode, TypeOfExpression, TypeOnlyAliasDeclaration, TypeOnlyExportDeclaration, TypeOnlyImportDeclaration, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypeQueryNode, TypeReferenceNode, UnionTypeNode, VariableDeclaration, VariableDeclarationList, VariableStatement, VoidExpression, WhileStatement, WithStatement, YieldExpression } from "typescript";
|
|
1
|
+
import { AccessorDeclaration, ArrayBindingElement, ArrayBindingPattern, ArrayLiteralExpression, ArrayTypeNode, ArrowFunction, AsExpression, AssertionExpression, AssertsKeyword, AsteriskToken, AutoAccessorPropertyDeclaration, AwaitExpression, AwaitKeyword, BigIntLiteral, BinaryExpression, BinaryOperatorToken, BindingElement, BindingName, BindingPattern, Block, BreakOrContinueStatement, BreakStatement, Bundle, CallChain, CallExpression, CallLikeExpression, CallSignatureDeclaration, CaseBlock, CaseClause, CaseOrDefaultClause, CatchClause, ClassDeclaration, ClassElement, ClassExpression, ClassLikeDeclaration, ClassStaticBlockDeclaration, ColonToken, CommaListExpression, ComputedPropertyName, ConciseBody, ConditionalExpression, ConditionalTypeNode, ConstructorDeclaration, ConstructorTypeNode, ConstructSignatureDeclaration, ContinueStatement, DebuggerStatement, DeclarationStatement, Decorator, DefaultClause, DeleteExpression, DoStatement, DotDotDotToken, ElementAccessChain, ElementAccessExpression, EmptyStatement, EntityName, EnumDeclaration, EnumMember, EqualsGreaterThanToken, ExclamationToken, ExportAssignment, ExportDeclaration, ExportSpecifier, Expression, ExpressionStatement, ExpressionWithTypeArguments, ExternalModuleReference, ForInitializer, ForInStatement, ForOfStatement, ForStatement, FunctionDeclaration, FunctionExpression, FunctionTypeNode, GetAccessorDeclaration, HeritageClause, Identifier, IfStatement, ImportAttribute, ImportAttributeName, ImportAttributes, ImportClause, ImportDeclaration, ImportEqualsDeclaration, ImportSpecifier, ImportTypeNode, IndexedAccessTypeNode, IndexSignatureDeclaration, InferTypeNode, InterfaceDeclaration, IntersectionTypeNode, JSDoc, JSDocAllType, JSDocAugmentsTag, JSDocAuthorTag, JSDocCallbackTag, JSDocClassTag, JSDocDeprecatedTag, JSDocEnumTag, JSDocFunctionType, JSDocImplementsTag, JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, JSDocMemberName, JSDocNamepathType, JSDocNameReference, JSDocNonNullableType, JSDocNullableType, JSDocOptionalType, JSDocOverloadTag, JSDocOverrideTag, JSDocParameterTag, JSDocPrivateTag, JSDocPropertyLikeTag, JSDocPropertyTag, JSDocProtectedTag, JSDocPublicTag, JSDocReadonlyTag, JSDocReturnTag, JSDocSatisfiesTag, JSDocSeeTag, JSDocSignature, JSDocTemplateTag, JSDocThisTag, JSDocThrowsTag, JSDocTypedefTag, JSDocTypeExpression, JSDocTypeLiteral, JSDocTypeTag, JSDocUnknownTag, JSDocUnknownType, JSDocVariadicType, JsxAttribute, JsxAttributeLike, JsxAttributes, JsxChild, JsxClosingElement, JsxClosingFragment, JsxElement, JsxExpression, JsxFragment, JsxNamespacedName, JsxOpeningElement, JsxOpeningFragment, JsxOpeningLikeElement, JsxSelfClosingElement, JsxSpreadAttribute, JsxTagNameExpression, JsxText, LabeledStatement, LeftHandSideExpression, LiteralExpression, LiteralTypeNode, MappedTypeNode, MemberName, MetaProperty, MethodDeclaration, MethodSignature, MinusToken, MissingDeclaration, Modifier, ModifierLike, ModuleBlock, ModuleBody, ModuleDeclaration, ModuleName, ModuleReference, NamedExportBindings, NamedExports, NamedImportBindings, NamedImports, NamedTupleMember, NamespaceExport, NamespaceExportDeclaration, NamespaceImport, NewExpression, Node, NonNullChain, NonNullExpression, NoSubstitutionTemplateLiteral, NotEmittedStatement, NumericLiteral, ObjectBindingPattern, ObjectLiteralElement, ObjectLiteralElementLike, ObjectLiteralExpression, OmittedExpression, OptionalTypeNode, ParameterDeclaration, ParenthesizedExpression, ParenthesizedTypeNode, PartiallyEmittedExpression, PlusToken, PostfixUnaryExpression, PrefixUnaryExpression, PrivateIdentifier, PropertyAccessChain, PropertyAccessExpression, PropertyAssignment, PropertyDeclaration, PropertyName, PropertySignature, QualifiedName, QuestionDotToken, QuestionToken, RegularExpressionLiteral, RestTypeNode, ReturnStatement, SatisfiesExpression, SemicolonClassElement, SetAccessorDeclaration, ShorthandPropertyAssignment, SourceFile, SpreadAssignment, SpreadElement, Statement, StringLiteral, SwitchStatement, SyntheticExpression, TaggedTemplateExpression, TemplateExpression, TemplateHead, TemplateLiteral, TemplateLiteralToken, TemplateLiteralTypeNode, TemplateLiteralTypeSpan, TemplateMiddle, TemplateSpan, TemplateTail, ThisTypeNode, ThrowStatement, TryStatement, TupleTypeNode, TypeAliasDeclaration, TypeAssertion, TypeElement, TypeLiteralNode, TypeNode, TypeOfExpression, TypeOnlyAliasDeclaration, TypeOnlyExportDeclaration, TypeOnlyImportDeclaration, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypeQueryNode, TypeReferenceNode, UnionTypeNode, VariableDeclaration, VariableDeclarationList, VariableStatement, VoidExpression, WhileStatement, WithStatement, YieldExpression } from "typescript";
|
|
2
2
|
export declare function isAccessor(node: Node, message?: string | Error): asserts node is AccessorDeclaration;
|
|
3
3
|
export declare function isArrayBindingElement(node: Node, message?: string | Error): asserts node is ArrayBindingElement;
|
|
4
4
|
export declare function isArrayBindingPattern(node: Node, message?: string | Error): asserts node is ArrayBindingPattern;
|
|
@@ -102,6 +102,7 @@ export declare function isJSDocDeprecatedTag(node: Node, message?: string | Erro
|
|
|
102
102
|
export declare function isJSDocEnumTag(node: Node, message?: string | Error): asserts node is JSDocEnumTag;
|
|
103
103
|
export declare function isJSDocFunctionType(node: Node, message?: string | Error): asserts node is JSDocFunctionType;
|
|
104
104
|
export declare function isJSDocImplementsTag(node: Node, message?: string | Error): asserts node is JSDocImplementsTag;
|
|
105
|
+
export declare function isJSDocImportTag(node: Node, message?: string | Error): asserts node is JSDocImportTag;
|
|
105
106
|
export declare function isJSDocLink(node: Node, message?: string | Error): asserts node is JSDocLink;
|
|
106
107
|
export declare function isJSDocLinkCode(node: Node, message?: string | Error): asserts node is JSDocLinkCode;
|
|
107
108
|
export declare function isJSDocLinkPlain(node: Node, message?: string | Error): asserts node is JSDocLinkPlain;
|
|
@@ -361,6 +362,7 @@ declare const _default: {
|
|
|
361
362
|
isJSDocEnumTag: typeof isJSDocEnumTag;
|
|
362
363
|
isJSDocFunctionType: typeof isJSDocFunctionType;
|
|
363
364
|
isJSDocImplementsTag: typeof isJSDocImplementsTag;
|
|
365
|
+
isJSDocImportTag: typeof isJSDocImportTag;
|
|
364
366
|
isJSDocLink: typeof isJSDocLink;
|
|
365
367
|
isJSDocLinkCode: typeof isJSDocLinkCode;
|
|
366
368
|
isJSDocLinkPlain: typeof isJSDocLinkPlain;
|
package/generated/assertions.js
CHANGED
|
@@ -309,6 +309,9 @@ export function isJSDocFunctionType(node, message = `expected JSDocFunctionType,
|
|
|
309
309
|
export function isJSDocImplementsTag(node, message = `expected JSDocImplementsTag, received ${ts.SyntaxKind[node.kind]}`) {
|
|
310
310
|
assert.equal(ts.isJSDocImplementsTag(node), true, message);
|
|
311
311
|
}
|
|
312
|
+
export function isJSDocImportTag(node, message = `expected JSDocImportTag, received ${ts.SyntaxKind[node.kind]}`) {
|
|
313
|
+
assert.equal(ts.isJSDocImportTag(node), true, message);
|
|
314
|
+
}
|
|
312
315
|
export function isJSDocLink(node, message = `expected JSDocLink, received ${ts.SyntaxKind[node.kind]}`) {
|
|
313
316
|
assert.equal(ts.isJSDocLink(node), true, message);
|
|
314
317
|
}
|
|
@@ -878,6 +881,7 @@ export default {
|
|
|
878
881
|
isJSDocEnumTag,
|
|
879
882
|
isJSDocFunctionType,
|
|
880
883
|
isJSDocImplementsTag,
|
|
884
|
+
isJSDocImportTag,
|
|
881
885
|
isJSDocLink,
|
|
882
886
|
isJSDocLinkCode,
|
|
883
887
|
isJSDocLinkPlain,
|
package/lib/main.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ declare const _default: {
|
|
|
118
118
|
isJSDocEnumTag: typeof import("../generated/assertions").isJSDocEnumTag;
|
|
119
119
|
isJSDocFunctionType: typeof import("../generated/assertions").isJSDocFunctionType;
|
|
120
120
|
isJSDocImplementsTag: typeof import("../generated/assertions").isJSDocImplementsTag;
|
|
121
|
+
isJSDocImportTag: typeof import("../generated/assertions").isJSDocImportTag;
|
|
121
122
|
isJSDocLink: typeof import("../generated/assertions").isJSDocLink;
|
|
122
123
|
isJSDocLinkCode: typeof import("../generated/assertions").isJSDocLinkCode;
|
|
123
124
|
isJSDocLinkPlain: typeof import("../generated/assertions").isJSDocLinkPlain;
|