Skip to content

Commit 69a091c

Browse files
SamChou19815meta-codesync[bot]
authored andcommitted
[flow] Flip default of experimental.builtin_ts_libdef_dynamic_discovery to true and only accept true
Reviewed By: gkz Differential Revision: D126975764 fbshipit-source-id: e4c79667818160983859d812c2b1551dea141911
1 parent 5deb9ce commit 69a091c

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎rust_port/crates/flow_common/src/files.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl Default for FileOptions {
154154
fn default() -> Self {
155155
Self {
156156
default_lib_dir: None,
157-
builtin_ts_libdef_dynamic_discovery: false,
157+
builtin_ts_libdef_dynamic_discovery: true,
158158
ignores: Vec::new(),
159159
untyped: Vec::new(),
160160
declarations: Vec::new(),

‎rust_port/crates/flow_config/src/flowconfig.rs‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ pub mod opts {
286286
automatic_require_default: None,
287287
babel_loose_array_spread: None,
288288
ban_spread_key_props: None,
289-
builtin_ts_libdef_dynamic_discovery: false,
289+
builtin_ts_libdef_dynamic_discovery: true,
290290
component_syntax: true,
291291
async_component_syntax: false,
292292
async_component_syntax_includes: Vec::new(),
@@ -2064,9 +2064,12 @@ pub mod opts {
20642064
"experimental.builtin_ts_libdef_dynamic_discovery",
20652065
|values, config| {
20662066
parse_boolean(
2067-
|opts, v| {
2068-
opts.builtin_ts_libdef_dynamic_discovery = v;
2069-
Ok(())
2067+
|_opts, v| {
2068+
if v {
2069+
Ok(())
2070+
} else {
2071+
Err("This option can only be set to `true`.".to_owned())
2072+
}
20702073
},
20712074
values,
20722075
config,

‎tests/saved_state_builtin_ts_libdef_discovery/.flowconfig‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ lib/
44
[options]
55
all=true
66
builtin_lib=default
7-
experimental.builtin_ts_libdef_dynamic_discovery=true

0 commit comments

Comments
 (0)