UNPKG

tsd

Version:

Check TypeScript type definitions

60 lines (59 loc) 6.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TsdError = exports.DiagnosticCode = void 0; var DiagnosticCode; (function (DiagnosticCode) { DiagnosticCode[DiagnosticCode["UnableToResolveSignatureOfClassDecorator"] = 1238] = "UnableToResolveSignatureOfClassDecorator"; DiagnosticCode[DiagnosticCode["UnableToResolveSignatureOfParameterDecorator"] = 1239] = "UnableToResolveSignatureOfParameterDecorator"; DiagnosticCode[DiagnosticCode["UnableToResolveSignatureOfPropertyDecorator"] = 1240] = "UnableToResolveSignatureOfPropertyDecorator"; DiagnosticCode[DiagnosticCode["UnableToResolveSignatureOfMethodDecorator"] = 1241] = "UnableToResolveSignatureOfMethodDecorator"; DiagnosticCode[DiagnosticCode["DecoratorCanOnlyDecorateMethodImplementation"] = 1249] = "DecoratorCanOnlyDecorateMethodImplementation"; DiagnosticCode[DiagnosticCode["DecoratorFunctionReturnTypeNotAssignableToType"] = 1270] = "DecoratorFunctionReturnTypeNotAssignableToType"; DiagnosticCode[DiagnosticCode["DecoratorFunctionReturnTypeExpectedToBeVoidOrAny"] = 1271] = "DecoratorFunctionReturnTypeExpectedToBeVoidOrAny"; DiagnosticCode[DiagnosticCode["RuntimeWillInvokeDecoratorWithXArgumentsButDecoratorExpectsY"] = 1278] = "RuntimeWillInvokeDecoratorWithXArgumentsButDecoratorExpectsY"; DiagnosticCode[DiagnosticCode["RuntimeWillInvokeDecoratorWithXArgumentsButDecoratorExpectsAtLeastY"] = 1279] = "RuntimeWillInvokeDecoratorWithXArgumentsButDecoratorExpectsAtLeastY"; DiagnosticCode[DiagnosticCode["AwaitExpressionOnlyAllowedWithinAsyncFunction"] = 1308] = "AwaitExpressionOnlyAllowedWithinAsyncFunction"; DiagnosticCode[DiagnosticCode["AcceptsTooFewArgumentsToBeUsedAsDecoratorHere"] = 1329] = "AcceptsTooFewArgumentsToBeUsedAsDecoratorHere"; DiagnosticCode[DiagnosticCode["TopLevelAwaitOnlyAllowedWhenModuleESNextOrSystem"] = 1378] = "TopLevelAwaitOnlyAllowedWhenModuleESNextOrSystem"; DiagnosticCode[DiagnosticCode["GenericTypeRequiresTypeArguments"] = 2314] = "GenericTypeRequiresTypeArguments"; DiagnosticCode[DiagnosticCode["GenericTypeRequiresBetweenXAndYTypeArugments"] = 2707] = "GenericTypeRequiresBetweenXAndYTypeArugments"; DiagnosticCode[DiagnosticCode["TypeIsNotAssignableToOtherType"] = 2322] = "TypeIsNotAssignableToOtherType"; DiagnosticCode[DiagnosticCode["TypeDoesNotSatisfyTheConstraint"] = 2344] = "TypeDoesNotSatisfyTheConstraint"; DiagnosticCode[DiagnosticCode["PropertyDoesNotExistOnType"] = 2339] = "PropertyDoesNotExistOnType"; DiagnosticCode[DiagnosticCode["ArgumentTypeIsNotAssignableToParameterType"] = 2345] = "ArgumentTypeIsNotAssignableToParameterType"; DiagnosticCode[DiagnosticCode["CannotAssignToReadOnlyProperty"] = 2540] = "CannotAssignToReadOnlyProperty"; DiagnosticCode[DiagnosticCode["PropertyDoesNotExistOnTypeDidYouMean"] = 2551] = "PropertyDoesNotExistOnTypeDidYouMean"; DiagnosticCode[DiagnosticCode["ExpectedArgumentsButGotOther"] = 2554] = "ExpectedArgumentsButGotOther"; DiagnosticCode[DiagnosticCode["ExpectedAtLeastArgumentsButGotOther"] = 2555] = "ExpectedAtLeastArgumentsButGotOther"; DiagnosticCode[DiagnosticCode["TypeHasNoPropertiesInCommonWith"] = 2559] = "TypeHasNoPropertiesInCommonWith"; DiagnosticCode[DiagnosticCode["ValueOfTypeNotCallable"] = 2348] = "ValueOfTypeNotCallable"; DiagnosticCode[DiagnosticCode["ExpressionNotCallable"] = 2349] = "ExpressionNotCallable"; DiagnosticCode[DiagnosticCode["OnlyVoidFunctionIsNewCallable"] = 2350] = "OnlyVoidFunctionIsNewCallable"; DiagnosticCode[DiagnosticCode["ExpressionNotConstructable"] = 2351] = "ExpressionNotConstructable"; DiagnosticCode[DiagnosticCode["ObjectLiteralMayOnlySpecifyKnownProperties"] = 2353] = "ObjectLiteralMayOnlySpecifyKnownProperties"; DiagnosticCode[DiagnosticCode["ObjectLiteralMayOnlySpecifyKnownProperties2"] = 2561] = "ObjectLiteralMayOnlySpecifyKnownProperties2"; DiagnosticCode[DiagnosticCode["TypeNotAssignableWithExactOptionalPropertyTypes"] = 2375] = "TypeNotAssignableWithExactOptionalPropertyTypes"; DiagnosticCode[DiagnosticCode["TypeNotAssignableToParameterWithExactOptionalPropertyTypes"] = 2379] = "TypeNotAssignableToParameterWithExactOptionalPropertyTypes"; DiagnosticCode[DiagnosticCode["TypeNotAssignableTypeOfTargetWithExactOptionalPropertyTypes"] = 2412] = "TypeNotAssignableTypeOfTargetWithExactOptionalPropertyTypes"; DiagnosticCode[DiagnosticCode["IndexSignatureOnlyPermitsReading"] = 2542] = "IndexSignatureOnlyPermitsReading"; DiagnosticCode[DiagnosticCode["NoOverloadExpectsCountOfArguments"] = 2575] = "NoOverloadExpectsCountOfArguments"; DiagnosticCode[DiagnosticCode["ThisContextOfTypeNotAssignableToMethodOfThisType"] = 2684] = "ThisContextOfTypeNotAssignableToMethodOfThisType"; DiagnosticCode[DiagnosticCode["TwoDifferentTypesSameName"] = 2719] = "TwoDifferentTypesSameName"; DiagnosticCode[DiagnosticCode["Type1IsMissingPropertiesFromType2Variant1"] = 2739] = "Type1IsMissingPropertiesFromType2Variant1"; DiagnosticCode[DiagnosticCode["Type1IsMissingPropertiesFromType2Variant2"] = 2740] = "Type1IsMissingPropertiesFromType2Variant2"; DiagnosticCode[DiagnosticCode["PropertyMissingInType1ButRequiredInType2"] = 2741] = "PropertyMissingInType1ButRequiredInType2"; DiagnosticCode[DiagnosticCode["NoOverloadExpectsCountOfTypeArguments"] = 2743] = "NoOverloadExpectsCountOfTypeArguments"; DiagnosticCode[DiagnosticCode["NoOverloadMatches"] = 2769] = "NoOverloadMatches"; DiagnosticCode[DiagnosticCode["StringLiteralTypeIsNotAssignableToUnionTypeWithSuggestion"] = 2820] = "StringLiteralTypeIsNotAssignableToUnionTypeWithSuggestion"; DiagnosticCode[DiagnosticCode["MemberCannotHaveOverrideModifierBecauseItIsNotDeclaredInBaseClass"] = 4113] = "MemberCannotHaveOverrideModifierBecauseItIsNotDeclaredInBaseClass"; DiagnosticCode[DiagnosticCode["MemberMustHaveOverrideModifier"] = 4114] = "MemberMustHaveOverrideModifier"; DiagnosticCode[DiagnosticCode["NewExpressionTargetLackingConstructSignatureHasAnyType"] = 7009] = "NewExpressionTargetLackingConstructSignatureHasAnyType"; DiagnosticCode[DiagnosticCode["ErrorIsOfTypeUnknown"] = 18046] = "ErrorIsOfTypeUnknown"; })(DiagnosticCode = exports.DiagnosticCode || (exports.DiagnosticCode = {})); class TsdError extends Error { constructor(message) { super(message); this.name = this.constructor.name; } } exports.TsdError = TsdError;