Skip to content

Commit

Permalink
Merge pull request oliverschwendener#469 from findjashua/strictProper…
Browse files Browse the repository at this point in the history
…tyInitialization

the road to strict mode: enable strictPropertyInitialization
  • Loading branch information
oliverschwendener authored Oct 18, 2020
2 parents c56c5fd + 67fcdf9 commit 452a8c9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { IconType } from "../../../common/icon/icon-type";
import { replaceWhitespace } from "../../../common/helpers/string-helpers";

export class ColorConverterPlugin implements ExecutionPlugin {
public pluginType: PluginType.ColorConverter;
public pluginType = PluginType.ColorConverter;
private config: ColorConverterOptions;
private readonly clipboardCopier: (value: string) => Promise<void>;

Expand Down
10 changes: 5 additions & 5 deletions src/main/plugins/control-panel-plugin/control-panel-item.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export class ControlPanelItem {
public Name: string;
public CanonicalName: string;
public Description: string;
public IconBase64: string;
export interface ControlPanelItem {
Name: string;
CanonicalName: string;
Description: string;
IconBase64: string;
}
2 changes: 1 addition & 1 deletion src/main/plugins/dictionary-plugin/dictionary-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class DictionaryPlugin implements ExecutionPlugin {
private config: DictionaryOptions;
private readonly clipboardCopier: (value: string) => Promise<void>;
private readonly definitionRetriever: (word: string) => Promise<Definition[]>;
private delay: NodeJS.Timeout | number;
private delay: NodeJS.Timeout | number | undefined;

constructor(
config: DictionaryOptions,
Expand Down
2 changes: 1 addition & 1 deletion src/main/plugins/mdfind-plugin/mdfind-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Icon } from "../../../common/icon/icon";

export class MdFindPlugin implements ExecutionPlugin, OpenLocationPlugin {
public readonly pluginType = PluginType.MdFindExecutionPlugin;
private searchDelay: NodeJS.Timeout | number;
private searchDelay: NodeJS.Timeout | number | undefined;

constructor(
private config: MdFindOptions,
Expand Down
2 changes: 1 addition & 1 deletion src/main/plugins/translation-plugin/translation-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { TranslationOptions } from "../../../common/config/translation-options";
export class TranslationPlugin implements ExecutionPlugin {
public readonly pluginType = PluginType.TranslationPlugin;
private config: TranslationOptions;
private delay: NodeJS.Timeout | number;
private delay: NodeJS.Timeout | number | undefined;
private readonly clipboardCopier: (value: string) => Promise<void>;

constructor(config: TranslationOptions, clipboardCopier: (value: string) => Promise<void>) {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
"strictNullChecks": true, /* Enable strict null checks. */
"resolveJsonModule": true,
"noUnusedLocals": true
"noUnusedLocals": true,
"strictPropertyInitialization": true
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
Expand Down

0 comments on commit 452a8c9

Please sign in to comment.