Skip to content

Commit

Permalink
docs(eslint-plugin): as const with no-object-literal-type-assertion (
Browse files Browse the repository at this point in the history
…#419)

This doc change was overlooked when the feature was added in b70c283.
  • Loading branch information
mkantor authored and bradzacher committed Apr 9, 2019
1 parent 3e26ab6 commit 12d47ae
Showing 1 changed file with 1 addition and 1 deletion.
@@ -1,6 +1,6 @@
# Forbids an object literal to appear in a type assertion expression (no-object-literal-type-assertion)

Always prefer `const x: T = { ... };` to `const x = { ... } as T;`. Casting to `any` and `unknown` is still allowed.
Always prefer `const x: T = { ... };` to `const x = { ... } as T;`. Casting to `any` and `unknown` is still allowed, and const assertions (`as const`) are still allowed.

## Rule Details

Expand Down

0 comments on commit 12d47ae

Please sign in to comment.