Skip to content

Commit

Permalink
refactor(ts): Enforce noImplicitOverride and fix existing occurences (
Browse files Browse the repository at this point in the history
  • Loading branch information
melink14 committed Apr 7, 2022
1 parent 2188e27 commit 8e37e87
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
4 changes: 2 additions & 2 deletions extension/options.ts
Expand Up @@ -11,7 +11,7 @@ type OptionEvent = {
class OptionsForm extends LitElement {
private content: Promise<TemplateResult> = this.fetchAndRender();

render() {
override render() {
return html`${until(this.content)}<lit-toast></lit-toast>`;
}

Expand Down Expand Up @@ -333,7 +333,7 @@ class OptionsForm extends LitElement {
`;
}

static styles = css`
static override styles = css`
#rikaikun-options,
#rikaikun-options td {
font-family: sans-serif;
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Expand Up @@ -11,6 +11,7 @@
"forceConsistentCasingInFileNames": true,
"noEmitOnError": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"pretty": true,
"sourceMap": true,
Expand Down
20 changes: 8 additions & 12 deletions utils/update-db.ts
Expand Up @@ -114,12 +114,12 @@ class DictParser extends Transform {
super(options);
}

/**
* Transforms data
*
* @override
*/
_transform(data: Buffer, encoding: string, callback: TransformCallback) {
/** Transforms data */
override _transform(
data: Buffer,
encoding: string,
callback: TransformCallback
) {
const line = data.toString('utf8');

// Skip the header
Expand Down Expand Up @@ -231,12 +231,8 @@ class KanjiDictParser extends Writable {
this.#heisigData = options.heisigData;
}

/**
* Write the data.
*
* @override
*/
_write(
/** Write the data. */
override _write(
chunk: Buffer,
encoding: string,
callback: (error?: Error | null) => void
Expand Down

0 comments on commit 8e37e87

Please sign in to comment.