Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

[no-inferred-empty-object-type] Skip test in TS > 3.4.x #4661

Merged
merged 2 commits into from Apr 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/rules/noInferredEmptyObjectTypeRule.ts
Expand Up @@ -30,8 +30,9 @@ export class Rule extends Lint.Rules.TypedRule {
options: null,
optionExamples: [true],
rationale: Lint.Utils.dedent`
When function or constructor may be called with a type parameter but one isn't supplied or inferrable,
TypeScript defaults to \`{}\`.
Prior to TypeScript 3.4, generic type parameters for functions and constructors are inferred as
\`{}\` (the empty object type) by default when no type parameter is explicitly supplied or when
the compiler cannot infer a more specific type.
This is often undesirable as the call is meant to be of a more specific type.
`,
type: "functionality",
Expand Down
1 change: 1 addition & 0 deletions test/rules/no-inferred-empty-object-type/test.ts.lint
@@ -1,3 +1,4 @@
[typescript]: <=3.4.x
let s: string;
let n: number;
let o: Object;
Expand Down