Skip to content

Commit 2dfc360

Browse files
committed
chore: also add constSysfsExpr to webkit package as it already worked in the transpiler
1 parent 0fbec7f commit 2dfc360

File tree

6 files changed

+43
-36
lines changed

6 files changed

+43
-36
lines changed

typescript-packages/browser/src/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { constSysfsExpr } from "./shared/constSysfsExpr";
2+
13
declare global {
24
interface Window {
35
Millennium: Millennium;
@@ -7,7 +9,7 @@ declare global {
79
/** Returnable IPC types */
810
type IPC_types = string | number | boolean | void;
911
/*
10-
Global Millennium API for developers.
12+
Global Millennium API for developers.
1113
*/
1214
type Millennium = {
1315
/**
@@ -40,4 +42,5 @@ declare global {
4042
declare const BindPluginSettings: () => any;
4143

4244
const Millennium: Millennium = window.Millennium;
43-
export { Millennium, callable, BindPluginSettings };
45+
export { BindPluginSettings, callable, constSysfsExpr, Millennium };
46+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../shared

typescript-packages/client/src/index.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
export * from './class-mapper';
2+
export * from './components';
13
export * from './custom-components';
24
export * from './custom-hooks';
3-
export * from './components';
45
export * from './deck-hooks';
5-
export * from './modules';
66
export * from './globals';
7-
export * from './webpack';
8-
export * from './utils';
9-
export * from './class-mapper';
107
export * from './millennium-api';
8+
export * from './modules';
9+
export * from './shared/constSysfsExpr';
10+
export * from './utils';
11+
export * from './webpack';
1112

1213
import ErrorBoundaryHook from './hooks/error-boundary-hook';
1314
import RouterHook from './hooks/router/router-hook';

typescript-packages/client/src/millennium-api.ts

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -57,34 +57,6 @@ declare global {
5757

5858
declare const BindPluginSettings: () => any;
5959

60-
interface FileInfo {
61-
content: string;
62-
filePath: string;
63-
fileName: string;
64-
}
65-
66-
type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'latin1' | 'binary' | 'hex';
67-
68-
interface SingleFileExprProps {
69-
basePath?: string;
70-
encoding?: BufferEncoding;
71-
}
72-
73-
interface MultiFileExprProps {
74-
basePath?: string;
75-
include?: string; // A regex pattern to include files
76-
encoding?: BufferEncoding;
77-
}
78-
79-
/**
80-
* Create a compile time filesystem expression.
81-
* This function will evaluate a file path at compile time, and embed a files content statically into the bundle.
82-
*/
83-
declare const constSysfsExpr: {
84-
(fileName: string, props: SingleFileExprProps): FileInfo;
85-
(props: MultiFileExprProps): FileInfo[];
86-
};
87-
8860
interface CDPMessage {
8961
id?: number;
9062
method: string;
@@ -183,5 +155,5 @@ class MillenniumChromeDevToolsProtocol {
183155

184156
const ChromeDevToolsProtocol: MillenniumChromeDevToolsProtocol = new MillenniumChromeDevToolsProtocol();
185157
const Millennium: Millennium = window.Millennium;
186-
export { BindPluginSettings, callable, ChromeDevToolsProtocol, constSysfsExpr, Millennium };
158+
export { BindPluginSettings, callable, ChromeDevToolsProtocol, Millennium };
187159

typescript-packages/client/src/shared

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../shared
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
interface FileInfo {
2+
content: string;
3+
filePath: string;
4+
fileName: string;
5+
}
6+
7+
type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'latin1' | 'binary' | 'hex';
8+
9+
interface SingleFileExprProps {
10+
basePath?: string;
11+
encoding?: BufferEncoding;
12+
}
13+
14+
interface MultiFileExprProps {
15+
basePath?: string;
16+
include?: string; // A regex pattern to include files
17+
encoding?: BufferEncoding;
18+
}
19+
20+
/**
21+
* Create a compile time filesystem expression.
22+
* This function will evaluate a file path at compile time, and embed a files content statically into the bundle.
23+
*/
24+
declare const constSysfsExpr: {
25+
(fileName: string, props: SingleFileExprProps): FileInfo;
26+
(props: MultiFileExprProps): FileInfo[];
27+
};
28+
29+
export { constSysfsExpr };

0 commit comments

Comments
 (0)