Skip to content

Commit

Permalink
refactor(ecmascript-plugins): update serverdirective signature (verce…
Browse files Browse the repository at this point in the history
…l/turborepo#4886)

### Description

Update missing signatures.
  • Loading branch information
kwonoj authored May 10, 2023
1 parent ff92995 commit 28f841e
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@ use swc_core::{
ecma::ast::{ModuleItem, Program},
quote,
};
use turbo_tasks::primitives::StringVc;
use turbopack_ecmascript::{CustomTransformer, TransformContext, UnsupportedServerActionIssue};

use super::is_server_module;

#[derive(Debug)]
pub struct ServerDirectiveTransformer;
pub struct ServerDirectiveTransformer {
// ServerDirective is not implemented yet and always reports an issue.
// We don't have to pass a valid transition name yet, but the API is prepared.
transition_name: StringVc,
}

impl ServerDirectiveTransformer {
pub fn new() -> Self {
Self
pub fn new(transition_name: &StringVc) -> Self {
Self {
transition_name: transition_name.clone(),
}
}
}

Expand Down

0 comments on commit 28f841e

Please sign in to comment.