avancement planning

This commit is contained in:
2026-05-26 11:58:39 +02:00
parent 619a2b240a
commit 150b97cd2e
4892 changed files with 99214 additions and 429382 deletions
+22 -19
View File
@@ -2,7 +2,7 @@
* The type of error that occurred.
* @public
*/
export declare type ErrorType = 'invalid-retry' | 'unknown-field'
export declare type ErrorType = "invalid-retry" | "unknown-field";
/**
* A parsed EventSource message event
@@ -15,16 +15,16 @@ export declare interface EventSourceMessage {
* implementation in that browsers will default this to `message`, whereas this parser will
* leave this as `undefined` if not explicitly declared.
*/
event?: string | undefined
event?: string | undefined;
/**
* ID of the message, if any was provided by the server. Can be used by clients to keep the
* last received message ID in sync when reconnecting.
*/
id?: string | undefined
id?: string | undefined;
/**
* The data received for this message
*/
data: string
data: string;
}
/**
@@ -48,8 +48,11 @@ export declare interface EventSourceMessage {
*
* @public
*/
export declare class EventSourceParserStream extends TransformStream<string, EventSourceMessage> {
constructor({onError, onRetry, onComment}?: StreamOptions)
export declare class EventSourceParserStream extends TransformStream<
string,
EventSourceMessage
> {
constructor({ onError, onRetry, onComment }?: StreamOptions);
}
/**
@@ -61,28 +64,28 @@ export declare class ParseError extends Error {
/**
* The type of error that occurred.
*/
type: ErrorType
type: ErrorType;
/**
* In the case of an unknown field encountered in the stream, this will be the field name.
*/
field?: string | undefined
field?: string | undefined;
/**
* In the case of an unknown field encountered in the stream, this will be the value of the field.
*/
value?: string | undefined
value?: string | undefined;
/**
* The line that caused the error, if available.
*/
line?: string | undefined
line?: string | undefined;
constructor(
message: string,
options: {
type: ErrorType
field?: string
value?: string
line?: string
type: ErrorType;
field?: string;
value?: string;
line?: string;
},
)
);
}
/**
@@ -100,19 +103,19 @@ export declare interface StreamOptions {
*
* @defaultValue `undefined`
*/
onError?: ('terminate' | ((error: Error) => void)) | undefined
onError?: ("terminate" | ((error: Error) => void)) | undefined;
/**
* Callback for when a reconnection interval is sent from the server.
*
* @param retry - The number of milliseconds to wait before reconnecting.
*/
onRetry?: ((retry: number) => void) | undefined
onRetry?: ((retry: number) => void) | undefined;
/**
* Callback for when a comment is encountered in the stream.
*
* @param comment - The comment encountered in the stream.
*/
onComment?: ((comment: string) => void) | undefined
onComment?: ((comment: string) => void) | undefined;
}
export {}
export {};