diff options
author | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-08-19 12:40:05 -0400 |
---|---|---|
committer | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-08-19 12:40:05 -0400 |
commit | da1ea6120ebdd1986eb55a749a95f0397ccc2373 (patch) | |
tree | 5dd41cbbc4b7609401bdc0cab46ca431836b43c2 /src | |
parent | a26ee13f1714fa6f6234310558a25ae8b493fa7d (diff) |
fixed comment typo
Diffstat (limited to 'src')
-rw-r--r-- | src/client/documents/Documents.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index ed3bf6d32..5f416edc0 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -1474,7 +1474,15 @@ export namespace DocUtils { return created; } - export async function DocumentFromType(type: string, path: string, options: DocumentOptions, rootDoc?: Doc): Promise<Opt<Doc>> { + /** + * + * @param type the type of file. + * @param path the path to the file. + * @param options the document options. + * @param overwriteDoc the placeholder loading doc. + * @returns + */ + export async function DocumentFromType(type: string, path: string, options: DocumentOptions, overwriteDoc?: Doc): Promise<Opt<Doc>> { let ctor: ((path: string, options: DocumentOptions, overwriteDoc?: Doc) => Doc | Promise<Doc | undefined>) | undefined = undefined; if (type.indexOf('image') !== -1) { ctor = Docs.Create.ImageDocument; @@ -1524,7 +1532,7 @@ export namespace DocUtils { options = { ...options, _width: 400, _height: 512, title: path }; } - return ctor ? ctor(path, options, rootDoc) : undefined; + return ctor ? ctor(path, options, overwriteDoc) : undefined; } export function addDocumentCreatorMenuItems(docTextAdder: (d: Doc) => void, docAdder: (d: Doc) => void, x: number, y: number, simpleMenu: boolean = false, pivotField?: string, pivotValue?: string): void { |