Skip to content

Commit c8f14fc

Browse files
committed
update import type definition #41
1 parent cfbea69 commit c8f14fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+47
-44
lines changed

README.md

Lines changed: 1 addition & 1 deletion

dist/index-umd-web.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9525,6 +9525,7 @@
95259525
const path = resolve(url, currentFile).absolute;
95269526
t = new URL(path, self.origin);
95279527
}
9528+
// @ts-ignore
95289529
return fetch(t, t.origin != self.origin ? { mode: 'cors' } : {}).then(parseResponse);
95299530
}
95309531

dist/index.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict';
22

3+
var process = require('node:process');
34
var promises = require('node:fs/promises');
45

56
exports.EnumToken = void 0;

dist/index.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -820,11 +820,11 @@ export declare interface MinifyFeature {
820820

821821
ordering: number;
822822

823-
register: (options: MinifyOptions | ParserOptions) => void;
824-
run: (ast: AstRule | AstAtRule, options: ParserOptions = {}, parent: AstRule | AstAtRule | AstRuleStyleSheet, context: {
825-
[key: string]: any
826-
}) => void;
827-
cleanup?: (ast: AstRuleStyleSheet, options: ParserOptions = {}, context: { [key: string]: any }) => void;
823+
register(options: MinifyOptions | ParserOptions): void;
824+
825+
// run(ast: AstRule | AstAtRule, options: ParserOptions = {}, parent: AstRule | AstAtRule | AstRuleStyleSheet, context: { [key: string]: any }): void;
826+
827+
// cleanup?(ast: AstRuleStyleSheet, options: ParserOptions = {}, context: { [key: string]: any }): void;
828828
}
829829

830830
export declare interface MinifyFeature {

dist/node/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'node:process';
12
export { EnumToken } from '../lib/ast/types.js';
23
export { minify } from '../lib/ast/minify.js';
34
export { walk, walkValues } from '../lib/ast/walk.js';

dist/web/load.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ async function load(url, currentFile) {
1818
const path = resolve(url, currentFile).absolute;
1919
t = new URL(path, self.origin);
2020
}
21+
// @ts-ignore
2122
return fetch(t, t.origin != self.origin ? { mode: 'cors' } : {}).then(parseResponse);
2223
}
2324

src/lib/ast/expand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {combinators, splitRule} from "./minify";
22
import {parseString} from "../parser";
33
import {walkValues} from "./walk";
44
import {renderToken} from "../renderer";
5-
import {AstAtRule, AstNode, AstRule, AstRuleStyleSheet, Token} from "../../@types/index.d.ts";
5+
import type {AstAtRule, AstNode, AstRule, AstRuleStyleSheet, Token} from "../../@types/index.d.ts";
66
import {EnumToken} from "./types";
77

88
export function expand(ast: AstNode): AstNode {

src/lib/ast/features/calc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {
1+
import type {
22
AstAtRule,
33
AstDeclaration,
44
AstRule,

src/lib/ast/features/inlinecssvariables.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {
1+
import type {
22
AstAtRule, AstComment,
33
AstDeclaration,
44
AstRule, AstRuleList,

src/lib/ast/features/shorthand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {PropertyList} from "../../parser/declaration";
22
import {EnumToken} from "../types";
3-
import {AstAtRule, AstRule, AstRuleStyleSheet, MinifyOptions, PropertyListOptions} from "../../../@types/index.d.ts";
3+
import type {AstAtRule, AstRule, AstRuleStyleSheet, MinifyOptions, PropertyListOptions} from "../../../@types/index.d.ts";
44

55
export class ComputeShorthandFeature {
66

0 commit comments

Comments
 (0)