You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Async parser that allows to cancel the current parsing process.
18
-
* The sync parser implementation is blocking the event loop, which can become quite problematic for large files.
17
+
* Async parser that allows cancellation of the current parsing process.
19
18
*
20
-
* Note that the default implementation is not actually async. It just wraps the sync parser in a promise.
21
-
* A real implementation would create worker threads or web workers to offload the parsing work.
19
+
* @remark The sync parser implementation is blocking the event loop, which can become quite problematic for large files.
20
+
* @remark The default implementation is not actually async. It just wraps the sync parser in a promise. A real implementation would create worker threads or web workers to offload the parsing work.
22
21
*/
23
22
exportinterfaceAsyncParser{
23
+
/**
24
+
* Parses the given text and returns the parse result.
25
+
*
26
+
* @param text The text to parse.
27
+
* @param cancelToken A cancellation token that can be used to cancel the parsing process.
28
+
* @returns A promise that resolves to the parse result.
29
+
*
30
+
* @throw `OperationCancelled` if the parsing process is cancelled.
0 commit comments