Skip to content

Commit

Permalink
chore(types): use more reasonable ts checking annotation comment (#7063)
Browse files Browse the repository at this point in the history
  • Loading branch information
zheeeng committed Feb 24, 2022
1 parent f38654f commit 745ae2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/client/client.ts
Expand Up @@ -254,7 +254,7 @@ export function updateStyle(id: string, content: string): void {
if (!style) {
style = new CSSStyleSheet()
style.replaceSync(content)
// @ts-ignore
// @ts-expect-error: using experimental API
document.adoptedStyleSheets = [...document.adoptedStyleSheets, style]
} else {
style.replaceSync(content)
Expand All @@ -281,7 +281,7 @@ export function removeStyle(id: string): void {
const style = sheetsMap.get(id)
if (style) {
if (style instanceof CSSStyleSheet) {
// @ts-ignore
// @ts-expect-error: using experimental API
document.adoptedStyleSheets = document.adoptedStyleSheets.filter(
(s: CSSStyleSheet) => s !== style
)
Expand Down

0 comments on commit 745ae2f

Please sign in to comment.