File tree Expand file tree Collapse file tree 6 files changed +59
-3
lines changed
packages/react-devtools-fusebox Expand file tree Collapse file tree 6 files changed +59
-3
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ packages/react-devtools-extensions/chrome/build
18
18
packages /react-devtools-extensions /firefox /build
19
19
packages /react-devtools-extensions /shared /build
20
20
packages /react-devtools-extensions /src /ErrorTesterCompiled.js
21
+ packages /react-devtools-fusebox /dist
21
22
packages /react-devtools-inline /dist
22
23
packages /react-devtools-shared /src /hooks /__tests__ /__source__ /__compiled__ /
23
24
packages /react-devtools-shared /src /hooks /__tests__ /__source__ /__untransformed__ /
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ packages/react-devtools-extensions/firefox/build
6
6
packages /react-devtools-extensions /edge /build
7
7
packages /react-devtools-extensions /shared /build
8
8
packages /react-devtools-extensions /src /ErrorTesterCompiled.js
9
+ packages /react-devtools-fusebox /dist
9
10
packages /react-devtools-inline /dist
10
11
packages /react-devtools-shared /src /hooks /__tests__ /__source__ /__compiled__ /
11
12
packages /react-devtools-shared /src /hooks /__tests__ /__source__ /__untransformed__ /
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- const { esNextPaths} = require ( './scripts/shared/pathsByLanguageVersion' ) ;
3
+ const {
4
+ esNextPaths,
5
+ typescriptPaths,
6
+ } = require ( './scripts/shared/pathsByLanguageVersion' ) ;
4
7
5
8
module . exports = {
6
9
bracketSpacing : false ,
@@ -17,5 +20,12 @@ module.exports = {
17
20
trailingComma : 'all' ,
18
21
} ,
19
22
} ,
23
+ {
24
+ files : typescriptPaths ,
25
+ options : {
26
+ trailingComma : 'all' ,
27
+ parser : 'typescript' ,
28
+ } ,
29
+ } ,
20
30
] ,
21
31
} ;
Original file line number Diff line number Diff line change 5
5
"license" : " MIT" ,
6
6
"files" : [" dist" ],
7
7
"scripts" : {
8
- "build:frontend:local" : " cross-env NODE_ENV=development webpack --config webpack.config.frontend.js" ,
9
- "build:frontend" : " cross-env NODE_ENV=production webpack --config webpack.config.frontend.js" ,
8
+ "build:frontend:copy-types" : " cp src/*.d.ts dist/" ,
9
+ "build:frontend:local" : " cross-env NODE_ENV=development webpack --config webpack.config.frontend.js && yarn build:frontend:copy-types" ,
10
+ "build:frontend" : " cross-env NODE_ENV=production webpack --config webpack.config.frontend.js && yarn build:frontend:copy-types" ,
10
11
"build" : " yarn build:frontend"
11
12
},
12
13
"devDependencies" : {
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ export type MessagePayload =
9
+ | null
10
+ | string
11
+ | number
12
+ | boolean
13
+ | { [ key : string ] : MessagePayload }
14
+ | MessagePayload [ ] ;
15
+ export type Message = { event : string ; payload ?: MessagePayload } ;
16
+
17
+ export type WallListener = ( message : Message ) => void ;
18
+ export type Wall = {
19
+ listen : ( fn : WallListener ) => Function ;
20
+ send : ( event : string , payload ?: MessagePayload ) => void ;
21
+ } ;
22
+
23
+ export type Bridge = {
24
+ shutdown : ( ) => void ;
25
+ } ;
26
+ export type Store = Object ;
27
+ export type BrowserTheme = 'dark' | 'light' ;
28
+
29
+ export function createBridge ( wall : Wall ) : Bridge ;
30
+ export function createStore ( bridge : Bridge ) : Store ;
31
+
32
+ export type InitializationOptions = {
33
+ bridge : Bridge ;
34
+ store : Store ;
35
+ theme ?: BrowserTheme ;
36
+ } ;
37
+ export function initialize (
38
+ node : Element | Document ,
39
+ options : InitializationOptions ,
40
+ ) : void ;
Original file line number Diff line number Diff line change @@ -25,7 +25,10 @@ const esNextPaths = [
25
25
// Files that we distribute on npm that should be ES5-only.
26
26
const es5Paths = [ 'packages/*/npm/**/*.js' ] ;
27
27
28
+ const typescriptPaths = [ 'packages/**/*.d.ts' ] ;
29
+
28
30
module . exports = {
29
31
esNextPaths,
30
32
es5Paths,
33
+ typescriptPaths,
31
34
} ;
You can’t perform that action at this time.
0 commit comments