-
Notifications
You must be signed in to change notification settings - Fork 157
Update doc parsing #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update doc parsing #324
Conversation
@@ -349,9 +350,25 @@ export class FilesNamespace { | |||
* | |||
* @deprecated Document parsing API is still in active development. Stay tuned for updates. | |||
*/ | |||
public async parseDocument(fileHandle: FileHandle, stack?: string) { | |||
public async parseDocument(fileHandle: FileHandle, parseOpts?: DocumentParsingOpts) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can provide defaults like so.
public async parseDocument(fileHandle: FileHandle, parseOpts: DocumentParsingOpts = {}) {
public async parseDocument(fileHandle: FileHandle, stack?: string) { | ||
public async parseDocument(fileHandle: FileHandle, parseOpts?: DocumentParsingOpts) { | ||
const stack = getCurrentStack(1); | ||
const parseOptsObj: DocumentParsingOpts = parseOpts || {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ Use the default pattern like above
* | ||
* @deprecated Document parsing API is still in active development. Stay tuned for updates. | ||
*/ | ||
public async documentParserId(fileHandle: FileHandle) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "getDocumentParsingMethod"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in love with Method
here. Can we do getDocumentParsingLibrary
or getDocumentParsingBackend
or getDocumentParsingFramework
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to getDocumentParsingLibrary
|
||
/** | ||
* @deprecated | ||
* N.B.: onProgress returns progress as a float taking values from 0 to 1, 1 being completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment doesn't seem to belong here.
No description provided.