Replace nullable by optional

This commit is contained in:
Pierre Vigier
2019-03-03 16:16:21 +01:00
parent 68d2c7b856
commit 1ccfa15c9a

View File

@@ -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<any>;
static blobToBuffer(oldBlob?: Blob, oldAsPath?: string,
buffer?: string, bufferAsPath?: string, opts?: DiffOptions, fileCb?: Function,
binaryCb?: Function, hunkCb?: Function, lineCb?: Function): Promise<any>;
static fromBuffer(content: string, contentLen: number): Promise<Diff>;
static indexToWorkdir(repo: Repository, index: Index | null, opts?: DiffOptions): Promise<Diff>;
static indexToWorkdir(repo: Repository, index?: Index, opts?: DiffOptions): Promise<Diff>;
static indexToIndex(repo: Repository, oldIndex: Index, newIndex: Index, opts?: DiffOptions): Promise<Diff>;
static treeToIndex(repo: Repository, oldTree: Tree | null, index: Index | null, opts?: DiffOptions): Promise<Diff>;
static treeToTree(repo: Repository, oldTree: Tree | null, new_tree: Tree | null, opts?: DiffOptions): Promise<Diff>;
static treeToWorkdir(repo: Repository, oldTree: Tree | null, opts?: DiffOptions): Promise<Diff>;
static treeToWorkdirWithIndex(repo: Repository, oldTree: Tree | null, opts?: DiffOptions): Promise<Diff>;
static treeToIndex(repo: Repository, oldTree?: Tree, index?: Index, opts?: DiffOptions): Promise<Diff>;
static treeToTree(repo: Repository, oldTree?: Tree, new_tree?: Tree, opts?: DiffOptions): Promise<Diff>;
static treeToWorkdir(repo: Repository, oldTree?: Tree, opts?: DiffOptions): Promise<Diff>;
static treeToWorkdirWithIndex(repo: Repository, oldTree?: Tree, opts?: DiffOptions): Promise<Diff>;
findSimilar(options?: DiffFindOptions): Promise<number>;
getDelta(idx: number): DiffDelta;