Skip to content

Commit 63a0d79

Browse files
fix example
1 parent 54627ff commit 63a0d79

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/file/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ export type SyntaxNode = {
601601
};
602602
children?: SyntaxNode[];
603603
};
604-
export declare const generateDiffFile: (oldFileName: string, oldFileContent: string, newFileName: string, newFileContent: string, option?: LinesOptions, uuid?: string) => DiffFile;
604+
export declare const generateDiffFile: (oldFileName: string, oldFileContent: string, newFileName: string, newFileContent: string, oldFileLang: string, newFileLang: string, option?: LinesOptions, uuid?: string) => DiffFile;
605605

606606
export {
607607
File$1 as File,

ui/react-example/src/components/MainContentDiffExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { MainContentDiffExampleCode } from "./MainContentDiffExampleCode";
1010
import { temp1, temp2 } from "./MainContentDiffExampleData";
1111
import { MainContentDiffExampleView } from "./MainContentDiffExampleView";
1212

13-
const _diffFile = generateDiffFile("temp1.tsx", temp1, "temp2.tsx", temp2);
13+
const _diffFile = generateDiffFile("temp1.tsx", temp1, "temp2.tsx", temp2, 'tsx', 'tsx');
1414

1515
const getNewDiffFile = () => {
1616
const instance = DiffFile.createInstance({

ui/react-example/src/components/PlayGroundContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const _PlayGroundFileDiff = ({ onClick }: { onClick: () => void }) => {
125125
setDiffInstance(undefined);
126126
return;
127127
}
128-
const data = generateDiffFile(`foo.${lang1}`, file1, `foo.${lang2}`, file2);
128+
const data = generateDiffFile(`foo.${lang1}`, file1, `foo.${lang2}`, file2, lang1, lang2);
129129
try {
130130
data?.init();
131131
data?.buildSplitDiffLines();

0 commit comments

Comments
 (0)