Skip to content

Commit

Permalink
More semantic use of partial<> utility type
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Aug 23, 2023
1 parent 367eda5 commit 22147d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions copy-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import path from 'path';
import slash from 'slash';

// Types
export type Options = {
export type Settings = {
cd: string, //change working directory before starting copy
targetFile: string, //destination path for file copy operation
targetFolder: string, //destination folder for file copy operation
Expand All @@ -22,7 +22,7 @@ export type Result = {

const copyFile = {

cp(sourceFile: string, options: Partial<Options>): Result {
cp(sourceFile: string, options?: Partial<Settings>): Result {
const defaults = {
cd: null,
targetFile: null,
Expand Down

0 comments on commit 22147d6

Please sign in to comment.