diff --git a/packages/css/src/core.ts b/packages/css/src/core.ts index a07b12772..6f80a630b 100644 --- a/packages/css/src/core.ts +++ b/packages/css/src/core.ts @@ -7,7 +7,7 @@ import { hexToRgb } from './utils/hex-to-rgb' import { flattenObject } from './utils/flatten-object' import { extendConfig } from './utils/extend-config' 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. +import './types/global' // 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 = { type: 'string', value: string } diff --git a/packages/css/types/global.d.ts b/packages/css/src/types/global.ts similarity index 81% rename from packages/css/types/global.d.ts rename to packages/css/src/types/global.ts index 0aceee886..d5a75b618 100644 --- a/packages/css/types/global.d.ts +++ b/packages/css/src/types/global.ts @@ -1,4 +1,4 @@ -import type Core from '../src/core' +import type Core from '../core' declare global { // eslint-disable-next-line no-var diff --git a/packages/validator/src/index.ts b/packages/validator/src/index.ts index 8924d83bf..001affba4 100644 --- a/packages/validator/src/index.ts +++ b/packages/validator/src/index.ts @@ -2,4 +2,4 @@ export { default as isClassValid } from './is-class-valid' export { default as validate } from './validate' export { default as generateValidRules } from './generate-valid-rules' -export * from '../types/syntax-error' \ No newline at end of file +export * from './types/syntax-error' \ No newline at end of file diff --git a/packages/validator/types/syntax-error.d.ts b/packages/validator/src/types/syntax-error.ts similarity index 100% rename from packages/validator/types/syntax-error.d.ts rename to packages/validator/src/types/syntax-error.ts diff --git a/packages/validator/src/validate-css.ts b/packages/validator/src/validate-css.ts index 1c5af90c0..a85e8b570 100644 --- a/packages/validator/src/validate-css.ts +++ b/packages/validator/src/validate-css.ts @@ -1,7 +1,7 @@ /* eslint-disable no-cond-assign */ // @ts-expect-error import { lexer, parse, walk, property as propertyName } from 'css-tree' -import { type SyntaxError } from '../types/syntax-error' +import { type SyntaxError } from './types/syntax-error' export default function validateCSS(text: string, parseOptions = { parseAtrulePrelude: false, diff --git a/packages/validator/src/validate.ts b/packages/validator/src/validate.ts index b38498b54..a7e55f9a0 100644 --- a/packages/validator/src/validate.ts +++ b/packages/validator/src/validate.ts @@ -1,4 +1,4 @@ -import { type SyntaxError } from '../types/syntax-error' +import { type SyntaxError } from './types/syntax-error' import { Config, MasterCSS } from '@master/css' import validateCSS from './validate-css'