mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05:00
fix properties missing from generated Svelte .d.ts files
They're currently being set to 'any', as we're not providing the dependencies to the tsc invocation. Older Anki versions had the same issue, and we'll want to fix that as well, but for now this at least restores the missing props.
This commit is contained in:
parent
585072635d
commit
b4cb2baa0e
1 changed files with 2 additions and 2 deletions
|
|
@ -97,7 +97,7 @@ function compile(tsPath: string, tsLibs: string[]) {
|
|||
const createdFiles = {};
|
||||
tsHost.writeFile = (fileName, contents) => (createdFiles[fileName] = contents);
|
||||
program.emit(undefined /* all files */, tsHost.writeFile);
|
||||
return createdFiles[parsedCommandLine.fileNames[0].replace(".ts", ".d.ts")];
|
||||
return createdFiles[parsedCommandLine.fileNames[0].replace(".tsx", ".d.ts")];
|
||||
}
|
||||
|
||||
function writeFile(file, data): Promise<void> {
|
||||
|
|
@ -186,7 +186,7 @@ async function compileSvelte(args) {
|
|||
const [sveltePath, mjsPath, dtsPath, cssPath, binDir, genDir, ...tsLibs] = args;
|
||||
const svelteSource = (await readFile(sveltePath)) as string;
|
||||
|
||||
const mockTsPath = sveltePath + ".ts";
|
||||
const mockTsPath = sveltePath + ".tsx";
|
||||
writeTs(svelteSource, sveltePath, mockTsPath);
|
||||
await writeDts(mockTsPath, dtsPath, tsLibs);
|
||||
await writeJs(svelteSource, sveltePath, mjsPath, cssPath, binDir, genDir);
|
||||
|
|
|
|||
Loading…
Reference in a new issue