pub struct RiptDotToml { /* private fields */ }
Expand description
The config file itself.
Implementations§
Source§impl RiptDotToml
impl RiptDotToml
Sourcepub fn provision() -> Result<PathBuf>
pub fn provision() -> Result<PathBuf>
Provision the config file if it doesn’t exist and return its path.
This deliberately does not create an instance of Self
, as we don’t want to read the source files
yet. Instead, the driver is responsible for creating them through the compiler sess. We could technically
do that here and bring in the driver as a dep, but that would prevent ript-cli
from using this,
and we want the CLI to remain usable on stable hence the reason for this existing as a separate crate
and offloading the reading / writing to consumers.
pub fn ript_preamble_namespace(&self) -> &str
Sourcepub fn outfile_writer(&self) -> Result<TsWriter>
pub fn outfile_writer(&self) -> Result<TsWriter>
Get a writer for the generated TypeScript file
Sourcepub fn outfile(&self) -> &PathBuf
pub fn outfile(&self) -> &PathBuf
Returns the generated TS path. This should not be used directly by the compiler driver for output, but should be used by the driver to add this file to the sourcemap so that changing it will trigger rebuilds.
Sourcepub fn camelize_namespaces(&self) -> bool
pub fn camelize_namespaces(&self) -> bool
Whether to camelize the namespace names.
pub fn overrides(&self) -> &HashMap<String, TsKeywordType>
Sourcepub fn omit_crate_name(&self) -> bool
pub fn omit_crate_name(&self) -> bool
Whether to omit the crate name from the generated TypeScript file.