Skip to content

Commit

Permalink
Test differing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Mar 5, 2024
1 parent 087410d commit 433b218
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
No errors
types/expect-tsconfigs/expect-dom-tests.ts
6:16 error [email protected] compile error:
Cannot find name 'WeakSet'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

==== types/expect-tsconfigs/expect-dom-tests.ts ====

// eslint-disable-next-line @definitelytyped/no-relative-import-in-test
import * as expect from "./";

const element: HTMLElement = expect.element;

const weakSet: WeakSet<{}> = expect.weakSet;
~~~~~~~
!!! @definitelytyped/expect: [email protected] compile error:
!!! : Cannot find name 'WeakSet'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ Cannot find name 'HTMLElement' @definitelytyped/expect
~~~~~~~~~~~
!!! @definitelytyped/expect: [email protected] compile error:
!!! : Cannot find name 'HTMLElement'.

const weakSet: WeakSet<{}> = expect.weakSet;
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
types/expect-tsconfigs/index.d.ts
1:23 error [email protected] compile error:
Cannot find name 'HTMLElement' @definitelytyped/expect
Cannot find name 'HTMLElement' @definitelytyped/expect
3:23 error [email protected] compile error:
Cannot find name 'WeakSet'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later @definitelytyped/expect

1 problem (1 error, 0 warnings)
2 problems (2 errors, 0 warnings)

==== types/expect-tsconfigs/index.d.ts ====

export const element: HTMLElement;
~~~~~~~~~~~
!!! @definitelytyped/expect: [email protected] compile error:
!!! : Cannot find name 'HTMLElement'.

export const weakSet: WeakSet<{}>;
~~~~~~~
!!! @definitelytyped/expect: [email protected] compile error:
!!! : Cannot find name 'WeakSet'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
import * as expect from "./";

const element: HTMLElement = expect.element;

const weakSet: WeakSet<{}> = expect.weakSet;
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
import * as expect from "./";

const element: HTMLElement = expect.element;

const weakSet: WeakSet<{}> = expect.weakSet;
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export const element: HTMLElement;

export const weakSet: WeakSet<{}>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"es5",
"dom"
],
"noImplicitAny": true,
Expand Down

0 comments on commit 433b218

Please sign in to comment.