Browse Source

Add type cast

master
hewenyang 7 years ago
parent
commit
e44e0a2850
  1. 2
      src/daemon/testData.ts

2
src/daemon/testData.ts

@ -81,7 +81,7 @@ export async function readRulesFile(dataName: string): Promise<TestData> {
const dataPath = pathLib.join(Cfg.testDataDirectory, dataName); const dataPath = pathLib.join(Cfg.testDataDirectory, dataName);
let fileContent = await tryReadFile(pathLib.join(dataPath, 'data.yml')); let fileContent = await tryReadFile(pathLib.join(dataPath, 'data.yml'));
if (fileContent != null) { if (fileContent != null) {
return parseYamlContent(yaml.safeLoad(fileContent), dataName); return parseYamlContent(yaml.safeLoad(fileContent) as UserConfigFile, dataName);
} else { // No data.yml } else { // No data.yml
let spj: Executable = null; let spj: Executable = null;
for (const lang of languages) { for (const lang of languages) {

Loading…
Cancel
Save