Skip to content

Commit 46083cb

Browse files
committed
feat: update types
1 parent 3f2a159 commit 46083cb

4 files changed

Lines changed: 36 additions & 2 deletions

File tree

types/Http/View/View.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ export default class View {
3131
*/
3232
__(key: string, default$?: string): string;
3333

34+
/**
35+
* Get asset path(s) from Vite manifest.
36+
*
37+
* @param {string | string[]} file
38+
* @returns {string}
39+
*/
40+
vite(file: string | string[]): string;
41+
3442
/**
3543
* Get old input.
3644
*/

types/Support/Helpers/mix.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/**
2-
@param {string} file
3-
*/
2+
* Get asset path from Laravel Mix manifest.
3+
* @param {string} file
4+
* @returns {string}
5+
* @deprecated
6+
*/
47
export default function mix(file: string): string;

types/Support/Helpers/vite.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* Get asset path(s) from Vite manifest.
3+
*
4+
* @param {string | string[]} file
5+
* @returns {string}
6+
*/
7+
export default function vite(file: string | string[]): string;

types/Vite/Repository.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
interface ViteManifest {
2+
[key: string]: {
3+
file: string;
4+
src?: string;
5+
isEntry?: boolean;
6+
imports?: string[];
7+
css?: string[];
8+
assets?: string[];
9+
};
10+
}
11+
12+
export default class Repository {
13+
static manifestCache: ViteManifest | null = null;
14+
static file(file: string): string;
15+
static getManifest(): ViteManifest | null;
16+
}

0 commit comments

Comments
 (0)