@cloudflare/workers-types 4.20241230.0 → 4.20250109.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1416,20 +1416,44 @@ interface Element {
1416
1416
  hasAttribute(name: string): boolean;
1417
1417
  setAttribute(name: string, value: string): Element;
1418
1418
  removeAttribute(name: string): Element;
1419
- before(content: string, options?: ContentOptions): Element;
1420
- after(content: string, options?: ContentOptions): Element;
1421
- prepend(content: string, options?: ContentOptions): Element;
1422
- append(content: string, options?: ContentOptions): Element;
1423
- replace(content: string, options?: ContentOptions): Element;
1419
+ before(
1420
+ content: string | ReadableStream | Response,
1421
+ options?: ContentOptions,
1422
+ ): Element;
1423
+ after(
1424
+ content: string | ReadableStream | Response,
1425
+ options?: ContentOptions,
1426
+ ): Element;
1427
+ prepend(
1428
+ content: string | ReadableStream | Response,
1429
+ options?: ContentOptions,
1430
+ ): Element;
1431
+ append(
1432
+ content: string | ReadableStream | Response,
1433
+ options?: ContentOptions,
1434
+ ): Element;
1435
+ replace(
1436
+ content: string | ReadableStream | Response,
1437
+ options?: ContentOptions,
1438
+ ): Element;
1424
1439
  remove(): Element;
1425
1440
  removeAndKeepContent(): Element;
1426
- setInnerContent(content: string, options?: ContentOptions): Element;
1441
+ setInnerContent(
1442
+ content: string | ReadableStream | Response,
1443
+ options?: ContentOptions,
1444
+ ): Element;
1427
1445
  onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
1428
1446
  }
1429
1447
  interface EndTag {
1430
1448
  name: string;
1431
- before(content: string, options?: ContentOptions): EndTag;
1432
- after(content: string, options?: ContentOptions): EndTag;
1449
+ before(
1450
+ content: string | ReadableStream | Response,
1451
+ options?: ContentOptions,
1452
+ ): EndTag;
1453
+ after(
1454
+ content: string | ReadableStream | Response,
1455
+ options?: ContentOptions,
1456
+ ): EndTag;
1433
1457
  remove(): EndTag;
1434
1458
  }
1435
1459
  interface Comment {
@@ -1444,9 +1468,18 @@ interface Text {
1444
1468
  readonly text: string;
1445
1469
  readonly lastInTextNode: boolean;
1446
1470
  readonly removed: boolean;
1447
- before(content: string, options?: ContentOptions): Text;
1448
- after(content: string, options?: ContentOptions): Text;
1449
- replace(content: string, options?: ContentOptions): Text;
1471
+ before(
1472
+ content: string | ReadableStream | Response,
1473
+ options?: ContentOptions,
1474
+ ): Text;
1475
+ after(
1476
+ content: string | ReadableStream | Response,
1477
+ options?: ContentOptions,
1478
+ ): Text;
1479
+ replace(
1480
+ content: string | ReadableStream | Response,
1481
+ options?: ContentOptions,
1482
+ ): Text;
1450
1483
  remove(): Text;
1451
1484
  }
1452
1485
  interface DocumentEnd {
@@ -5378,6 +5411,7 @@ declare module "cloudflare:workers" {
5378
5411
  [Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
5379
5412
  protected ctx: ExecutionContext;
5380
5413
  protected env: Env;
5414
+ constructor(ctx: ExecutionContext, env: Env);
5381
5415
  run(
5382
5416
  event: Readonly<WorkflowEvent<T>>,
5383
5417
  step: WorkflowStep,
@@ -1421,20 +1421,44 @@ export interface Element {
1421
1421
  hasAttribute(name: string): boolean;
1422
1422
  setAttribute(name: string, value: string): Element;
1423
1423
  removeAttribute(name: string): Element;
1424
- before(content: string, options?: ContentOptions): Element;
1425
- after(content: string, options?: ContentOptions): Element;
1426
- prepend(content: string, options?: ContentOptions): Element;
1427
- append(content: string, options?: ContentOptions): Element;
1428
- replace(content: string, options?: ContentOptions): Element;
1424
+ before(
1425
+ content: string | ReadableStream | Response,
1426
+ options?: ContentOptions,
1427
+ ): Element;
1428
+ after(
1429
+ content: string | ReadableStream | Response,
1430
+ options?: ContentOptions,
1431
+ ): Element;
1432
+ prepend(
1433
+ content: string | ReadableStream | Response,
1434
+ options?: ContentOptions,
1435
+ ): Element;
1436
+ append(
1437
+ content: string | ReadableStream | Response,
1438
+ options?: ContentOptions,
1439
+ ): Element;
1440
+ replace(
1441
+ content: string | ReadableStream | Response,
1442
+ options?: ContentOptions,
1443
+ ): Element;
1429
1444
  remove(): Element;
1430
1445
  removeAndKeepContent(): Element;
1431
- setInnerContent(content: string, options?: ContentOptions): Element;
1446
+ setInnerContent(
1447
+ content: string | ReadableStream | Response,
1448
+ options?: ContentOptions,
1449
+ ): Element;
1432
1450
  onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
1433
1451
  }
1434
1452
  export interface EndTag {
1435
1453
  name: string;
1436
- before(content: string, options?: ContentOptions): EndTag;
1437
- after(content: string, options?: ContentOptions): EndTag;
1454
+ before(
1455
+ content: string | ReadableStream | Response,
1456
+ options?: ContentOptions,
1457
+ ): EndTag;
1458
+ after(
1459
+ content: string | ReadableStream | Response,
1460
+ options?: ContentOptions,
1461
+ ): EndTag;
1438
1462
  remove(): EndTag;
1439
1463
  }
1440
1464
  export interface Comment {
@@ -1449,9 +1473,18 @@ export interface Text {
1449
1473
  readonly text: string;
1450
1474
  readonly lastInTextNode: boolean;
1451
1475
  readonly removed: boolean;
1452
- before(content: string, options?: ContentOptions): Text;
1453
- after(content: string, options?: ContentOptions): Text;
1454
- replace(content: string, options?: ContentOptions): Text;
1476
+ before(
1477
+ content: string | ReadableStream | Response,
1478
+ options?: ContentOptions,
1479
+ ): Text;
1480
+ after(
1481
+ content: string | ReadableStream | Response,
1482
+ options?: ContentOptions,
1483
+ ): Text;
1484
+ replace(
1485
+ content: string | ReadableStream | Response,
1486
+ options?: ContentOptions,
1487
+ ): Text;
1455
1488
  remove(): Text;
1456
1489
  }
1457
1490
  export interface DocumentEnd {
@@ -1422,20 +1422,44 @@ interface Element {
1422
1422
  hasAttribute(name: string): boolean;
1423
1423
  setAttribute(name: string, value: string): Element;
1424
1424
  removeAttribute(name: string): Element;
1425
- before(content: string, options?: ContentOptions): Element;
1426
- after(content: string, options?: ContentOptions): Element;
1427
- prepend(content: string, options?: ContentOptions): Element;
1428
- append(content: string, options?: ContentOptions): Element;
1429
- replace(content: string, options?: ContentOptions): Element;
1425
+ before(
1426
+ content: string | ReadableStream | Response,
1427
+ options?: ContentOptions,
1428
+ ): Element;
1429
+ after(
1430
+ content: string | ReadableStream | Response,
1431
+ options?: ContentOptions,
1432
+ ): Element;
1433
+ prepend(
1434
+ content: string | ReadableStream | Response,
1435
+ options?: ContentOptions,
1436
+ ): Element;
1437
+ append(
1438
+ content: string | ReadableStream | Response,
1439
+ options?: ContentOptions,
1440
+ ): Element;
1441
+ replace(
1442
+ content: string | ReadableStream | Response,
1443
+ options?: ContentOptions,
1444
+ ): Element;
1430
1445
  remove(): Element;
1431
1446
  removeAndKeepContent(): Element;
1432
- setInnerContent(content: string, options?: ContentOptions): Element;
1447
+ setInnerContent(
1448
+ content: string | ReadableStream | Response,
1449
+ options?: ContentOptions,
1450
+ ): Element;
1433
1451
  onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
1434
1452
  }
1435
1453
  interface EndTag {
1436
1454
  name: string;
1437
- before(content: string, options?: ContentOptions): EndTag;
1438
- after(content: string, options?: ContentOptions): EndTag;
1455
+ before(
1456
+ content: string | ReadableStream | Response,
1457
+ options?: ContentOptions,
1458
+ ): EndTag;
1459
+ after(
1460
+ content: string | ReadableStream | Response,
1461
+ options?: ContentOptions,
1462
+ ): EndTag;
1439
1463
  remove(): EndTag;
1440
1464
  }
1441
1465
  interface Comment {
@@ -1450,9 +1474,18 @@ interface Text {
1450
1474
  readonly text: string;
1451
1475
  readonly lastInTextNode: boolean;
1452
1476
  readonly removed: boolean;
1453
- before(content: string, options?: ContentOptions): Text;
1454
- after(content: string, options?: ContentOptions): Text;
1455
- replace(content: string, options?: ContentOptions): Text;
1477
+ before(
1478
+ content: string | ReadableStream | Response,
1479
+ options?: ContentOptions,
1480
+ ): Text;
1481
+ after(
1482
+ content: string | ReadableStream | Response,
1483
+ options?: ContentOptions,
1484
+ ): Text;
1485
+ replace(
1486
+ content: string | ReadableStream | Response,
1487
+ options?: ContentOptions,
1488
+ ): Text;
1456
1489
  remove(): Text;
1457
1490
  }
1458
1491
  interface DocumentEnd {
@@ -5404,6 +5437,7 @@ declare module "cloudflare:workers" {
5404
5437
  [Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
5405
5438
  protected ctx: ExecutionContext;
5406
5439
  protected env: Env;
5440
+ constructor(ctx: ExecutionContext, env: Env);
5407
5441
  run(
5408
5442
  event: Readonly<WorkflowEvent<T>>,
5409
5443
  step: WorkflowStep,
@@ -1427,20 +1427,44 @@ export interface Element {
1427
1427
  hasAttribute(name: string): boolean;
1428
1428
  setAttribute(name: string, value: string): Element;
1429
1429
  removeAttribute(name: string): Element;
1430
- before(content: string, options?: ContentOptions): Element;
1431
- after(content: string, options?: ContentOptions): Element;
1432
- prepend(content: string, options?: ContentOptions): Element;
1433
- append(content: string, options?: ContentOptions): Element;
1434
- replace(content: string, options?: ContentOptions): Element;
1430
+ before(
1431
+ content: string | ReadableStream | Response,
1432
+ options?: ContentOptions,
1433
+ ): Element;
1434
+ after(
1435
+ content: string | ReadableStream | Response,
1436
+ options?: ContentOptions,
1437
+ ): Element;
1438
+ prepend(
1439
+ content: string | ReadableStream | Response,
1440
+ options?: ContentOptions,
1441
+ ): Element;
1442
+ append(
1443
+ content: string | ReadableStream | Response,
1444
+ options?: ContentOptions,
1445
+ ): Element;
1446
+ replace(
1447
+ content: string | ReadableStream | Response,
1448
+ options?: ContentOptions,
1449
+ ): Element;
1435
1450
  remove(): Element;
1436
1451
  removeAndKeepContent(): Element;
1437
- setInnerContent(content: string, options?: ContentOptions): Element;
1452
+ setInnerContent(
1453
+ content: string | ReadableStream | Response,
1454
+ options?: ContentOptions,
1455
+ ): Element;
1438
1456
  onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
1439
1457
  }
1440
1458
  export interface EndTag {
1441
1459
  name: string;
1442
- before(content: string, options?: ContentOptions): EndTag;
1443
- after(content: string, options?: ContentOptions): EndTag;
1460
+ before(
1461
+ content: string | ReadableStream | Response,
1462
+ options?: ContentOptions,
1463
+ ): EndTag;
1464
+ after(
1465
+ content: string | ReadableStream | Response,
1466
+ options?: ContentOptions,
1467
+ ): EndTag;
1444
1468
  remove(): EndTag;
1445
1469
  }
1446
1470
  export interface Comment {
@@ -1455,9 +1479,18 @@ export interface Text {
1455
1479
  readonly text: string;
1456
1480
  readonly lastInTextNode: boolean;
1457
1481
  readonly removed: boolean;
1458
- before(content: string, options?: ContentOptions): Text;
1459
- after(content: string, options?: ContentOptions): Text;
1460
- replace(content: string, options?: ContentOptions): Text;
1482
+ before(
1483
+ content: string | ReadableStream | Response,
1484
+ options?: ContentOptions,
1485
+ ): Text;
1486
+ after(
1487
+ content: string | ReadableStream | Response,
1488
+ options?: ContentOptions,
1489
+ ): Text;
1490
+ replace(
1491
+ content: string | ReadableStream | Response,
1492
+ options?: ContentOptions,
1493
+ ): Text;
1461
1494
  remove(): Text;
1462
1495
  }
1463
1496
  export interface DocumentEnd {
@@ -1440,20 +1440,44 @@ interface Element {
1440
1440
  hasAttribute(name: string): boolean;
1441
1441
  setAttribute(name: string, value: string): Element;
1442
1442
  removeAttribute(name: string): Element;
1443
- before(content: string, options?: ContentOptions): Element;
1444
- after(content: string, options?: ContentOptions): Element;
1445
- prepend(content: string, options?: ContentOptions): Element;
1446
- append(content: string, options?: ContentOptions): Element;
1447
- replace(content: string, options?: ContentOptions): Element;
1443
+ before(
1444
+ content: string | ReadableStream | Response,
1445
+ options?: ContentOptions,
1446
+ ): Element;
1447
+ after(
1448
+ content: string | ReadableStream | Response,
1449
+ options?: ContentOptions,
1450
+ ): Element;
1451
+ prepend(
1452
+ content: string | ReadableStream | Response,
1453
+ options?: ContentOptions,
1454
+ ): Element;
1455
+ append(
1456
+ content: string | ReadableStream | Response,
1457
+ options?: ContentOptions,
1458
+ ): Element;
1459
+ replace(
1460
+ content: string | ReadableStream | Response,
1461
+ options?: ContentOptions,
1462
+ ): Element;
1448
1463
  remove(): Element;
1449
1464
  removeAndKeepContent(): Element;
1450
- setInnerContent(content: string, options?: ContentOptions): Element;
1465
+ setInnerContent(
1466
+ content: string | ReadableStream | Response,
1467
+ options?: ContentOptions,
1468
+ ): Element;
1451
1469
  onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
1452
1470
  }
1453
1471
  interface EndTag {
1454
1472
  name: string;
1455
- before(content: string, options?: ContentOptions): EndTag;
1456
- after(content: string, options?: ContentOptions): EndTag;
1473
+ before(
1474
+ content: string | ReadableStream | Response,
1475
+ options?: ContentOptions,
1476
+ ): EndTag;
1477
+ after(
1478
+ content: string | ReadableStream | Response,
1479
+ options?: ContentOptions,
1480
+ ): EndTag;
1457
1481
  remove(): EndTag;
1458
1482
  }
1459
1483
  interface Comment {
@@ -1468,9 +1492,18 @@ interface Text {
1468
1492
  readonly text: string;
1469
1493
  readonly lastInTextNode: boolean;
1470
1494
  readonly removed: boolean;
1471
- before(content: string, options?: ContentOptions): Text;
1472
- after(content: string, options?: ContentOptions): Text;
1473
- replace(content: string, options?: ContentOptions): Text;
1495
+ before(
1496
+ content: string | ReadableStream | Response,
1497
+ options?: ContentOptions,
1498
+ ): Text;
1499
+ after(
1500
+ content: string | ReadableStream | Response,
1501
+ options?: ContentOptions,
1502
+ ): Text;
1503
+ replace(
1504
+ content: string | ReadableStream | Response,
1505
+ options?: ContentOptions,
1506
+ ): Text;
1474
1507
  remove(): Text;
1475
1508
  }
1476
1509
  interface DocumentEnd {
@@ -5429,6 +5462,7 @@ declare module "cloudflare:workers" {
5429
5462
  [Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
5430
5463
  protected ctx: ExecutionContext;
5431
5464
  protected env: Env;
5465
+ constructor(ctx: ExecutionContext, env: Env);
5432
5466
  run(
5433
5467
  event: Readonly<WorkflowEvent<T>>,
5434
5468
  step: WorkflowStep,
@@ -1445,20 +1445,44 @@ export interface Element {
1445
1445
  hasAttribute(name: string): boolean;
1446
1446
  setAttribute(name: string, value: string): Element;
1447
1447
  removeAttribute(name: string): Element;
1448
- before(content: string, options?: ContentOptions): Element;
1449
- after(content: string, options?: ContentOptions): Element;
1450
- prepend(content: string, options?: ContentOptions): Element;
1451
- append(content: string, options?: ContentOptions): Element;
1452
- replace(content: string, options?: ContentOptions): Element;
1448
+ before(
1449
+ content: string | ReadableStream | Response,
1450
+ options?: ContentOptions,
1451
+ ): Element;
1452
+ after(
1453
+ content: string | ReadableStream | Response,
1454
+ options?: ContentOptions,
1455
+ ): Element;
1456
+ prepend(
1457
+ content: string | ReadableStream | Response,
1458
+ options?: ContentOptions,
1459
+ ): Element;
1460
+ append(
1461
+ content: string | ReadableStream | Response,
1462
+ options?: ContentOptions,
1463
+ ): Element;
1464
+ replace(
1465
+ content: string | ReadableStream | Response,
1466
+ options?: ContentOptions,
1467
+ ): Element;
1453
1468
  remove(): Element;
1454
1469
  removeAndKeepContent(): Element;
1455
- setInnerContent(content: string, options?: ContentOptions): Element;
1470
+ setInnerContent(
1471
+ content: string | ReadableStream | Response,
1472
+ options?: ContentOptions,
1473
+ ): Element;
1456
1474
  onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
1457
1475
  }
1458
1476
  export interface EndTag {
1459
1477
  name: string;
1460
- before(content: string, options?: ContentOptions): EndTag;
1461
- after(content: string, options?: ContentOptions): EndTag;
1478
+ before(
1479
+ content: string | ReadableStream | Response,
1480
+ options?: ContentOptions,
1481
+ ): EndTag;
1482
+ after(
1483
+ content: string | ReadableStream | Response,
1484
+ options?: ContentOptions,
1485
+ ): EndTag;
1462
1486
  remove(): EndTag;
1463
1487
  }
1464
1488
  export interface Comment {
@@ -1473,9 +1497,18 @@ export interface Text {
1473
1497
  readonly text: string;
1474
1498
  readonly lastInTextNode: boolean;
1475
1499
  readonly removed: boolean;
1476
- before(content: string, options?: ContentOptions): Text;
1477
- after(content: string, options?: ContentOptions): Text;
1478
- replace(content: string, options?: ContentOptions): Text;
1500
+ before(
1501
+ content: string | ReadableStream | Response,
1502
+ options?: ContentOptions,
1503
+ ): Text;
1504
+ after(
1505
+ content: string | ReadableStream | Response,
1506
+ options?: ContentOptions,
1507
+ ): Text;
1508
+ replace(
1509
+ content: string | ReadableStream | Response,
1510
+ options?: ContentOptions,
1511
+ ): Text;
1479
1512
  remove(): Text;
1480
1513
  }
1481
1514
  export interface DocumentEnd {
@@ -1440,20 +1440,44 @@ interface Element {
1440
1440
  hasAttribute(name: string): boolean;
1441
1441
  setAttribute(name: string, value: string): Element;
1442
1442
  removeAttribute(name: string): Element;
1443
- before(content: string, options?: ContentOptions): Element;
1444
- after(content: string, options?: ContentOptions): Element;
1445
- prepend(content: string, options?: ContentOptions): Element;
1446
- append(content: string, options?: ContentOptions): Element;
1447
- replace(content: string, options?: ContentOptions): Element;
1443
+ before(
1444
+ content: string | ReadableStream | Response,
1445
+ options?: ContentOptions,
1446
+ ): Element;
1447
+ after(
1448
+ content: string | ReadableStream | Response,
1449
+ options?: ContentOptions,
1450
+ ): Element;
1451
+ prepend(
1452
+ content: string | ReadableStream | Response,
1453
+ options?: ContentOptions,
1454
+ ): Element;
1455
+ append(
1456
+ content: string | ReadableStream | Response,
1457
+ options?: ContentOptions,
1458
+ ): Element;
1459
+ replace(
1460
+ content: string | ReadableStream | Response,
1461
+ options?: ContentOptions,
1462
+ ): Element;
1448
1463
  remove(): Element;
1449
1464
  removeAndKeepContent(): Element;
1450
- setInnerContent(content: string, options?: ContentOptions): Element;
1465
+ setInnerContent(
1466
+ content: string | ReadableStream | Response,
1467
+ options?: ContentOptions,
1468
+ ): Element;
1451
1469
  onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
1452
1470
  }
1453
1471
  interface EndTag {
1454
1472
  name: string;
1455
- before(content: string, options?: ContentOptions): EndTag;
1456
- after(content: string, options?: ContentOptions): EndTag;
1473
+ before(
1474
+ content: string | ReadableStream | Response,
1475
+ options?: ContentOptions,
1476
+ ): EndTag;
1477
+ after(
1478
+ content: string | ReadableStream | Response,
1479
+ options?: ContentOptions,
1480
+ ): EndTag;
1457
1481
  remove(): EndTag;
1458
1482
  }
1459
1483
  interface Comment {
@@ -1468,9 +1492,18 @@ interface Text {
1468
1492
  readonly text: string;
1469
1493
  readonly lastInTextNode: boolean;
1470
1494
  readonly removed: boolean;
1471
- before(content: string, options?: ContentOptions): Text;
1472
- after(content: string, options?: ContentOptions): Text;
1473
- replace(content: string, options?: ContentOptions): Text;
1495
+ before(
1496
+ content: string | ReadableStream | Response,
1497
+ options?: ContentOptions,
1498
+ ): Text;
1499
+ after(
1500
+ content: string | ReadableStream | Response,
1501
+ options?: ContentOptions,
1502
+ ): Text;
1503
+ replace(
1504
+ content: string | ReadableStream | Response,
1505
+ options?: ContentOptions,
1506
+ ): Text;
1474
1507
  remove(): Text;
1475
1508
  }
1476
1509
  interface DocumentEnd {
@@ -5430,6 +5463,7 @@ declare module "cloudflare:workers" {
5430
5463
  [Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never;
5431
5464
  protected ctx: ExecutionContext;
5432
5465
  protected env: Env;
5466
+ constructor(ctx: ExecutionContext, env: Env);
5433
5467
  run(
5434
5468
  event: Readonly<WorkflowEvent<T>>,
5435
5469
  step: WorkflowStep,
@@ -1445,20 +1445,44 @@ export interface Element {
1445
1445
  hasAttribute(name: string): boolean;
1446
1446
  setAttribute(name: string, value: string): Element;
1447
1447
  removeAttribute(name: string): Element;
1448
- before(content: string, options?: ContentOptions): Element;
1449
- after(content: string, options?: ContentOptions): Element;
1450
- prepend(content: string, options?: ContentOptions): Element;
1451
- append(content: string, options?: ContentOptions): Element;
1452
- replace(content: string, options?: ContentOptions): Element;
1448
+ before(
1449
+ content: string | ReadableStream | Response,
1450
+ options?: ContentOptions,
1451
+ ): Element;
1452
+ after(
1453
+ content: string | ReadableStream | Response,
1454
+ options?: ContentOptions,
1455
+ ): Element;
1456
+ prepend(
1457
+ content: string | ReadableStream | Response,
1458
+ options?: ContentOptions,
1459
+ ): Element;
1460
+ append(
1461
+ content: string | ReadableStream | Response,
1462
+ options?: ContentOptions,
1463
+ ): Element;
1464
+ replace(
1465
+ content: string | ReadableStream | Response,
1466
+ options?: ContentOptions,
1467
+ ): Element;
1453
1468
  remove(): Element;
1454
1469
  removeAndKeepContent(): Element;
1455
- setInnerContent(content: string, options?: ContentOptions): Element;
1470
+ setInnerContent(
1471
+ content: string | ReadableStream | Response,
1472
+ options?: ContentOptions,
1473
+ ): Element;
1456
1474
  onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
1457
1475
  }
1458
1476
  export interface EndTag {
1459
1477
  name: string;
1460
- before(content: string, options?: ContentOptions): EndTag;
1461
- after(content: string, options?: ContentOptions): EndTag;
1478
+ before(
1479
+ content: string | ReadableStream | Response,
1480
+ options?: ContentOptions,
1481
+ ): EndTag;
1482
+ after(
1483
+ content: string | ReadableStream | Response,
1484
+ options?: ContentOptions,
1485
+ ): EndTag;
1462
1486
  remove(): EndTag;
1463
1487
  }
1464
1488
  export interface Comment {
@@ -1473,9 +1497,18 @@ export interface Text {
1473
1497
  readonly text: string;
1474
1498
  readonly lastInTextNode: boolean;
1475
1499
  readonly removed: boolean;
1476
- before(content: string, options?: ContentOptions): Text;
1477
- after(content: string, options?: ContentOptions): Text;
1478
- replace(content: string, options?: ContentOptions): Text;
1500
+ before(
1501
+ content: string | ReadableStream | Response,
1502
+ options?: ContentOptions,
1503
+ ): Text;
1504
+ after(
1505
+ content: string | ReadableStream | Response,
1506
+ options?: ContentOptions,
1507
+ ): Text;
1508
+ replace(
1509
+ content: string | ReadableStream | Response,
1510
+ options?: ContentOptions,
1511
+ ): Text;
1479
1512
  remove(): Text;
1480
1513
  }
1481
1514
  export interface DocumentEnd {