Skip to content

Commit

Permalink
feat: to function can return Promise
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Jul 5, 2024
1 parent adc4d4c commit 91302af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/node_binding/binding.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ export interface RawCopyGlobOptions {

export interface RawCopyPattern {
from: string
to?: string | ((pathData: { context: string; absoluteFilename?: string }) => string)
to?: string | ((pathData: { context: string; absoluteFilename?: string }) => string | Promise<string>)
context?: string
toType?: string
noErrorOnMissing: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct RawCopyPattern {
pub from: String,
#[derivative(Debug = "ignore")]
#[napi(
ts_type = "string | ((pathData: { context: string; absoluteFilename?: string }) => string)"
ts_type = "string | ((pathData: { context: string; absoluteFilename?: string }) => string | Promise<string>)"
)]
pub to: Option<RawTo>,
pub context: Option<String>,
Expand Down

0 comments on commit 91302af

Please sign in to comment.