pub enum QuoteStyle {
Single,
Double,
}Expand description
How TypeScript string literals are quoted in emitted source.
Affects every place the emitter renders a quoted string literal — today
that’s enum variant wire names in string-literal unions ('Red' vs.
"Red"). The choice has no effect on the wire shape; it’s purely a
generated-source style toggle that lets consumers match their project’s
existing quote convention (eslint’s quotes: ['error', 'single'] style
vs. Prettier’s default of "...").
Default is QuoteStyle::Single to preserve byte-identical emission
for current ontogen-ts consumers; new consumers wanting double quotes
(e.g. to match what specta emitted before the ontogen-ts cut-over) set
it explicitly on their EmitConfig.
Variants§
Single
'foo' | 'bar' — matches ontogen-ts’s default and eslint’s
quotes: ['error', 'single'] style.
Double
"foo" | "bar" — matches Prettier’s default and TypeScript’s own
documentation examples; what specta emitted before the ontogen-ts
cut-over.
Trait Implementations§
Source§impl Clone for QuoteStyle
impl Clone for QuoteStyle
Source§fn clone(&self) -> QuoteStyle
fn clone(&self) -> QuoteStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more