📅  最后修改于: 2022-03-11 14:48:12.827000             🧑  作者: Mango
function isFiltered({statements}: ts.Block): boolean {
switch (statements.length) {
case 0: return true;
case 1: return statements[0].kind === ts.SyntaxKind.IfStatement;
default:
return statements[0].kind === ts.SyntaxKind.IfStatement && nodeIsContinue((statements[0] as ts.IfStatement).thenStatement);
}
}