From e59cb7af904c8ff64048b100e5d09ba875c34fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Tue, 30 Nov 2021 23:46:03 -0300 Subject: [PATCH] feat: Nullable in DirectoryContract and FileContract --- package.json | 2 +- src/Utils/FS/DirectoryContract.ts | 9 ++++----- src/Utils/FS/FileContract.ts | 8 ++++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 810ab96..3732e2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@secjs/contracts", - "version": "1.2.0", + "version": "1.2.1", "license": "MIT", "author": "João Lenon", "repository": "https://github.com/SecJS/Contracts.git", diff --git a/src/Utils/FS/DirectoryContract.ts b/src/Utils/FS/DirectoryContract.ts index c5799ab..6badee1 100644 --- a/src/Utils/FS/DirectoryContract.ts +++ b/src/Utils/FS/DirectoryContract.ts @@ -1,9 +1,8 @@ import { FileContract } from './FileContract' export interface DirectoryContract { - name: string - base: string - path: string - files: FileContract[] - folders: DirectoryContract[] + name?: string + path?: string + files?: FileContract[] + folders?: DirectoryContract[] } diff --git a/src/Utils/FS/FileContract.ts b/src/Utils/FS/FileContract.ts index 3cc5186..f93ad3f 100644 --- a/src/Utils/FS/FileContract.ts +++ b/src/Utils/FS/FileContract.ts @@ -1,6 +1,6 @@ export interface FileContract { - name: string - base: string - path: string - value: string | Buffer + name?: string + base?: string + path?: string + value?: string | Buffer }