Skip to content

Commit

Permalink
phase
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jan 21, 2024
1 parent 55bb645 commit 5e05f1b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/relay/transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub enum RelayLanguageConfig {
pub enum OutputFileExtension {
TypeScript,
JavaScript,
Undefined
Undefined,
}

impl<'a> TryFrom<&'a str> for RelayLanguageConfig {
Expand All @@ -41,15 +41,17 @@ impl<'a> TryFrom<&'a str> for RelayLanguageConfig {
}
}


impl<'a> TryFrom<&'a str> for OutputFileExtension {
type Error = String;

fn try_from(value: &'a str) -> Result<Self, Self::Error> {
match value {
"ts" => Ok(Self::TypeScript),
"js" => Ok(Self::JavaScript),
_ => Err(format!("Unexpected output file extension value '{}'", value)),
_ => Err(format!(
"Unexpected output file extension value '{}'",
value
)),
}
}
}
Expand Down Expand Up @@ -87,6 +89,7 @@ impl RelayImport {
src: Box::new(self.path.clone().into()),
type_only: false,
with: None,
phase: Default::default(),
}))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ impl VisitMut for TranspileCssProp {
}),
type_only: Default::default(),
with: Default::default(),
phase: Default::default(),
})),
);
}
Expand Down
1 change: 1 addition & 0 deletions packages/styled-jsx/transform/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ pub fn styled_jsx_import_decl(style_import_name: &str) -> ModuleItem {
value: "styled-jsx/style".into(),
raw: None,
}),
phase: Default::default(),
}))
}

Expand Down
1 change: 1 addition & 0 deletions packages/transform-imports/transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ impl<'a> Rewriter<'a> {
span: old_decl.span,
type_only: false,
with: None,
phase: Default::default(),
});
}
_ => {
Expand Down

0 comments on commit 5e05f1b

Please sign in to comment.