Skip to content

Commit 405733b

Browse files
committed
Refactor
1 parent 7593e82 commit 405733b

File tree

1 file changed

+7
-2
lines changed
  • packages/tailwindcss-language-server/src/testing

1 file changed

+7
-2
lines changed

packages/tailwindcss-language-server/src/testing/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ export interface TestUtils {
99
root: string
1010
}
1111

12+
export interface StorageSymlink {
13+
[IS_A_SYMLINK]: true
14+
filepath: string
15+
}
16+
1217
export interface Storage {
1318
/** A list of files and their content */
14-
[filePath: string]: string | Uint8Array | { [IS_A_SYMLINK]: true; filepath: string }
19+
[filePath: string]: string | Uint8Array | StorageSymlink
1520
}
1621

1722
export interface TestConfig<Extras extends {}> {
@@ -70,7 +75,7 @@ async function setup<T>(config: TestConfig<T>): Promise<TestUtils> {
7075
}
7176

7277
const IS_A_SYMLINK = Symbol('is-a-symlink')
73-
export const symlinkTo = function (filepath: string) {
78+
export function symlinkTo(filepath: string): StorageSymlink {
7479
return {
7580
[IS_A_SYMLINK]: true as const,
7681
filepath,

0 commit comments

Comments
 (0)