Skip to content

Commit

Permalink
Use @types/web@^0.0.17 (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaperStrike authored Aug 18, 2021
1 parent 0a538d2 commit c28a793
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
6 changes: 1 addition & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,5 @@
"@typescript-eslint",
"jest"
],
"root": true,
"rules": {
// https://github.com/typescript-eslint/typescript-eslint/issues/3712
"@typescript-eslint/no-throw-literal": "off"
}
"root": true
}
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@babel/preset-typescript": "^7.14.5",
"@babel/runtime": "^7.15.0",
"@types/jest": "^27.0.0",
"@types/web": "^0.0.17",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.29.0",
"babel-loader": "^8.2.2",
Expand Down
15 changes: 1 addition & 14 deletions src/utils/DefaultTrigger.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import type { Pjax } from '..';
import Submission from '../libs/Submission';

/**
* Here until
* https://github.com/microsoft/TypeScript/issues/40811
*/
interface SubmitEvent extends Event {
readonly submitter: HTMLElement | null;
readonly target: HTMLFormElement;
}

type Link = HTMLAnchorElement | HTMLAreaElement;

/**
Expand Down Expand Up @@ -95,11 +86,7 @@ export default class DefaultTrigger {
// Lacking browser compatibility and small polyfill. - August 2, 2021
if ('SubmitEvent' in window) {
document.addEventListener('submit', (event) => {
/**
* A as until
* https://github.com/microsoft/TypeScript/issues/40811
*/
this.onFormSubmit(event as SubmitEvent);
this.onFormSubmit(event);
});
}
}
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es2021"],
"module": "commonjs",
"skipLibCheck": true,
"strict": true,
Expand Down

0 comments on commit c28a793

Please sign in to comment.