Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
MrWangJustToDo committed Oct 29, 2024
1 parent 54627ff commit 63a0d79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/file/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ export type SyntaxNode = {
};
children?: SyntaxNode[];
};
export declare const generateDiffFile: (oldFileName: string, oldFileContent: string, newFileName: string, newFileContent: string, option?: LinesOptions, uuid?: string) => DiffFile;
export declare const generateDiffFile: (oldFileName: string, oldFileContent: string, newFileName: string, newFileContent: string, oldFileLang: string, newFileLang: string, option?: LinesOptions, uuid?: string) => DiffFile;

export {
File$1 as File,
Expand Down
2 changes: 1 addition & 1 deletion ui/react-example/src/components/MainContentDiffExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { MainContentDiffExampleCode } from "./MainContentDiffExampleCode";
import { temp1, temp2 } from "./MainContentDiffExampleData";
import { MainContentDiffExampleView } from "./MainContentDiffExampleView";

const _diffFile = generateDiffFile("temp1.tsx", temp1, "temp2.tsx", temp2);
const _diffFile = generateDiffFile("temp1.tsx", temp1, "temp2.tsx", temp2, 'tsx', 'tsx');

const getNewDiffFile = () => {
const instance = DiffFile.createInstance({
Expand Down
2 changes: 1 addition & 1 deletion ui/react-example/src/components/PlayGroundContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const _PlayGroundFileDiff = ({ onClick }: { onClick: () => void }) => {
setDiffInstance(undefined);
return;
}
const data = generateDiffFile(`foo.${lang1}`, file1, `foo.${lang2}`, file2);
const data = generateDiffFile(`foo.${lang1}`, file1, `foo.${lang2}`, file2, lang1, lang2);
try {
data?.init();
data?.buildSplitDiffLines();
Expand Down

0 comments on commit 63a0d79

Please sign in to comment.