-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow][as-const] hints propagate through "as const"
Summary: Changelog: [internal] Reviewed By: SamChou19815 Differential Revision: D56888740 fbshipit-source-id: b6f972716b5bedeaaf337eb03a4c74fa3c7c872f
- Loading branch information
1 parent
eab2383
commit 812dd64
Showing
3 changed files
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[options] | ||
all=true | ||
as_const=true | ||
experimental.ts_syntax=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// hints propagate through "as const" | ||
const arr: readonly [(x: string) => void] = [(x) => {}] as const; // okay | ||
const obj: {+f: (x: string) => void} = {f: (x) => {}} as const; // okay |