2023-01-02 16:00:42 -05:00
|
|
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
2020-12-13 13:45:53 -05:00
|
|
|
|
2023-11-12 23:52:59 -05:00
|
|
|
pub mod bootstrap;
|
2020-12-13 13:45:53 -05:00
|
|
|
pub mod fs_events;
|
2021-07-12 06:44:49 -04:00
|
|
|
pub mod http;
|
2020-12-13 13:45:53 -05:00
|
|
|
pub mod os;
|
|
|
|
pub mod permissions;
|
|
|
|
pub mod process;
|
|
|
|
pub mod runtime;
|
|
|
|
pub mod signal;
|
|
|
|
pub mod tty;
|
2021-04-06 04:33:43 -04:00
|
|
|
mod utils;
|
2020-12-13 13:45:53 -05:00
|
|
|
pub mod web_worker;
|
|
|
|
pub mod worker_host;
|
|
|
|
|
|
|
|
use deno_core::OpState;
|
|
|
|
|
|
|
|
/// Helper for checking unstable features. Used for sync ops.
|
2023-10-12 11:55:50 -04:00
|
|
|
pub fn check_unstable(state: &OpState, feature: &str, api_name: &str) {
|
|
|
|
// TODO(bartlomieju): replace with `state.feature_checker.check_or_exit`
|
|
|
|
// once we phase out `check_or_exit_with_legacy_fallback`
|
2023-10-04 15:42:17 -04:00
|
|
|
state
|
|
|
|
.feature_checker
|
2023-10-12 11:55:50 -04:00
|
|
|
.check_or_exit_with_legacy_fallback(feature, api_name);
|
2020-12-13 13:45:53 -05:00
|
|
|
}
|
2021-08-16 08:29:54 -04:00
|
|
|
|
|
|
|
pub struct TestingFeaturesEnabled(pub bool);
|