File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @opentf/obj-diff " : minor
3
+ ---
4
+
5
+ Exported the missing DiffResult type.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import prettier from "prettier/standalone";
11
11
import * as babelPlugin from "prettier/parser-babel" ;
12
12
import * as estreeParser from "prettier/plugins/estree" ;
13
13
14
- async function format ( code ) {
14
+ async function format ( code : string ) {
15
15
const formatted = await prettier . format ( `const a = ${ code } ` , {
16
16
parser : "babel" ,
17
17
plugins : [ babelPlugin , estreeParser ] ,
@@ -29,7 +29,7 @@ function App() {
29
29
const [ obj2Val , setObj2Val ] = useState ( `{
30
30
a: 2, c: 5
31
31
}` ) ;
32
- const [ raw , setRaw ] = useState ( [ ] ) ;
32
+ const [ raw , setRaw ] = useState < Array < DiffResult > ( [ ] ) ;
33
33
34
34
useEffect ( ( ) => {
35
35
async function runFormat ( ) {
Original file line number Diff line number Diff line change 1
1
import { ADDED , CHANGED , DELETED } from "./constants" ;
2
2
3
- type DiffResult = {
3
+ export type DiffResult = {
4
4
t : 0 | 1 | 2 ;
5
5
p : Array < string | number > ;
6
6
v ?: unknown ;
You can’t perform that action at this time.
0 commit comments