Skip to content

Commit

Permalink
refactor(ecmascript-plugins): update serverdirective signature (#4886)
Browse files Browse the repository at this point in the history
### Description

Update missing signatures.
  • Loading branch information
kwonoj committed May 10, 2023
1 parent 29ac32e commit 289fd85
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 289fd85

Please sign in to comment.