From 8ec8b4c0d4b7b0f8e7b3a080a7742f83f8c71228 Mon Sep 17 00:00:00 2001 From: Aron Date: Sun, 25 Feb 2024 20:01:39 +0800 Subject: [PATCH] Fix type imports in CSS core and rule files --- packages/css/src/core.ts | 4 ++-- packages/css/src/rule.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/css/src/core.ts b/packages/css/src/core.ts index 7ac0630a0..a07b12772 100644 --- a/packages/css/src/core.ts +++ b/packages/css/src/core.ts @@ -1,12 +1,12 @@ /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */ -import { Rule, NativeRule, RuleDefinition, RegisteredRule } from './rule' +import { Rule, type NativeRule, type RuleDefinition, type RegisteredRule } from './rule' import type { Config, AnimationDefinitions } from './config' import { config as defaultConfig } from './config' import { Layer } from './layer' import { hexToRgb } from './utils/hex-to-rgb' import { flattenObject } from './utils/flatten-object' import { extendConfig } from './utils/extend-config' -import { PropertiesHyphen } from 'csstype' +import { type PropertiesHyphen } from 'csstype' import '../types/global.d' // fix: ../css/src/core.ts:1205:16 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature. type VariableValue = diff --git a/packages/css/src/rule.ts b/packages/css/src/rule.ts index d3c868a34..316d16b5c 100644 --- a/packages/css/src/rule.ts +++ b/packages/css/src/rule.ts @@ -3,7 +3,7 @@ import MasterCSS, { type Variable } from './core' import { START_SYMBOLS } from './constants/start-symbol' import cssEscape from 'css-shared/utils/css-escape' import { Layer } from './layer' -import { PropertiesHyphen } from 'csstype' +import { type PropertiesHyphen } from 'csstype' import { BASE_UNIT_REGEX } from './constants/base-unit-regex' const atRuleRegExp = /^(media|supports|page|font-face|keyframes|counter-style|font-feature-values|property|layer)(?=\||{|\(|$)/