Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tsdjs/tsd
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.30.6
Choose a base ref
...
head repository: tsdjs/tsd
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.30.7
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on Feb 24, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    700679e View commit details
  2. 0.30.7

    sindresorhus committed Feb 24, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bef04e0 View commit details
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tsd",
"version": "0.30.6",
"version": "0.30.7",
"description": "Check TypeScript type definitions",
"license": "MIT",
"repository": "tsdjs/tsd",
1 change: 1 addition & 0 deletions source/lib/compiler.ts
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ const expectErrorDiagnosticCodesToIgnore = new Set<DiagnosticCode>([
DiagnosticCode.RuntimeWillInvokeDecoratorWithXArgumentsButDecoratorExpectsAtLeastY,
DiagnosticCode.AcceptsTooFewArgumentsToBeUsedAsDecoratorHere,
DiagnosticCode.PropertyDoesNotExistOnTypeDidYouMean,
DiagnosticCode.ErrorIsOfTypeUnknown,
]);

type IgnoreDiagnosticResult = 'preserve' | 'ignore' | Location;
1 change: 1 addition & 0 deletions source/lib/interfaces.ts
Original file line number Diff line number Diff line change
@@ -66,6 +66,7 @@ export enum DiagnosticCode {
MemberCannotHaveOverrideModifierBecauseItIsNotDeclaredInBaseClass = 4113,
MemberMustHaveOverrideModifier = 4114,
NewExpressionTargetLackingConstructSignatureHasAnyType = 7009,
ErrorIsOfTypeUnknown = 18046,
}

export interface Diagnostic {
4 changes: 3 additions & 1 deletion source/test/fixtures/expect-error/values/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,9 @@ try {
expectError(foo.bar = 'quux');
expectError(foo.quux);
}
} catch {}
} catch (error) {
expectError(error.code);
}

expectError(hasProperty({name: 1}));

7 changes: 6 additions & 1 deletion source/test/fixtures/expect-error/values/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"name": "foo"
"name": "foo",
"tsd": {
"compilerOptions": {
"useUnknownInCatchVariables": true
}
}
}