From 1ccfa15c9a34fa05b08e8515280b8ca22acd013f Mon Sep 17 00:00:00 2001 From: Pierre Vigier Date: Sun, 3 Mar 2019 16:16:21 +0100 Subject: [PATCH] Replace nullable by optional --- types/nodegit/diff.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/types/nodegit/diff.d.ts b/types/nodegit/diff.d.ts index 2f1abbda62..3a02577b98 100644 --- a/types/nodegit/diff.d.ts +++ b/types/nodegit/diff.d.ts @@ -132,16 +132,16 @@ export class Diff { * * */ - static blobToBuffer(oldBlob: Blob | null, oldAsPath: string | null, - buffer: string | null, bufferAsPath: string | null, opts: DiffOptions | null, fileCb: Function | null, - binaryCb: Function | null, hunkCb: Function | null, lineCb: Function): Promise; + static blobToBuffer(oldBlob?: Blob, oldAsPath?: string, + buffer?: string, bufferAsPath?: string, opts?: DiffOptions, fileCb?: Function, + binaryCb?: Function, hunkCb?: Function, lineCb?: Function): Promise; static fromBuffer(content: string, contentLen: number): Promise; - static indexToWorkdir(repo: Repository, index: Index | null, opts?: DiffOptions): Promise; + static indexToWorkdir(repo: Repository, index?: Index, opts?: DiffOptions): Promise; static indexToIndex(repo: Repository, oldIndex: Index, newIndex: Index, opts?: DiffOptions): Promise; - static treeToIndex(repo: Repository, oldTree: Tree | null, index: Index | null, opts?: DiffOptions): Promise; - static treeToTree(repo: Repository, oldTree: Tree | null, new_tree: Tree | null, opts?: DiffOptions): Promise; - static treeToWorkdir(repo: Repository, oldTree: Tree | null, opts?: DiffOptions): Promise; - static treeToWorkdirWithIndex(repo: Repository, oldTree: Tree | null, opts?: DiffOptions): Promise; + static treeToIndex(repo: Repository, oldTree?: Tree, index?: Index, opts?: DiffOptions): Promise; + static treeToTree(repo: Repository, oldTree?: Tree, new_tree?: Tree, opts?: DiffOptions): Promise; + static treeToWorkdir(repo: Repository, oldTree?: Tree, opts?: DiffOptions): Promise; + static treeToWorkdirWithIndex(repo: Repository, oldTree?: Tree, opts?: DiffOptions): Promise; findSimilar(options?: DiffFindOptions): Promise; getDelta(idx: number): DiffDelta;