chore: abstract types to shared package (#1593)

* chore: update types

* small typing change

* fix typing issue

* typed node

* add extra lint skip

* add changeset

---------

Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
This commit is contained in:
David Newell
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 97c93a171d
commit 8d634cba97
36 changed files with 256 additions and 250 deletions

View File

@@ -56,6 +56,6 @@
"cssstyle": "^2.3.0",
"nwsapi": "2.2.0",
"rrdom": "^2.0.0-alpha.17",
"rrweb-snapshot": "^2.0.0-alpha.17"
"@rrweb/types": "^2.0.0-alpha.17"
}
}

View File

@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { NodeType as RRNodeType } from 'rrweb-snapshot';
import { NodeType as RRNodeType } from '@rrweb/types';
import type { NWSAPI } from 'nwsapi';
import type { CSSStyleDeclaration as CSSStyleDeclarationType } from 'cssstyle';
import {
@@ -345,7 +344,7 @@ export class RRStyleElement extends RRElement {
for (const child of this.childNodes)
if (child.RRNodeType === RRNodeType.Text)
result += (child as RRText).textContent;
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment
this._sheet = cssom.parse(result);
}
return this._sheet;

View File

@@ -4,7 +4,7 @@
import { describe, it, expect, beforeAll } from 'vitest';
import * as fs from 'fs';
import * as path from 'path';
import { NodeType as RRNodeType } from 'rrweb-snapshot';
import { NodeType as RRNodeType } from '@rrweb/types';
import {
RRCanvasElement,
RRCDATASection,

View File

@@ -10,7 +10,7 @@
"path": "../rrdom"
},
{
"path": "../rrweb-snapshot"
"path": "../types"
}
]
}