Skip to content

Commit

Permalink
remove redundant return types
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugos68 committed Dec 19, 2024
1 parent af5f9c0 commit 0a2e3cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/necroparser/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function isArrayType(type: ts.Type) {
return type.symbol?.name === 'Array' || type.symbol?.name === 'ReadonlyArray';
}

function isObjectType(type: ts.Type): boolean {
function isObjectType(type: ts.Type) {
if (!(type.flags & ts.TypeFlags.Object)) {
return false;
}
Expand All @@ -42,7 +42,7 @@ function isObjectType(type: ts.Type): boolean {
return hasObjectFlags || type.getProperties().length > 0;
}

function determineTypeKind(type: ts.Type): InterfaceProperty['typeKind'] {
function determineTypeKind(type: ts.Type) {
if (isFunctionType(type)) {
return 'function';
}
Expand Down Expand Up @@ -76,7 +76,7 @@ function parseProperty(property: ts.Symbol, node: ts.Node, typeChecker: ts.TypeC
};
}

function createVirtualCompilerHost(sourcePath: string, sourceCode: string): ts.CompilerHost {
function createVirtualCompilerHost(sourcePath: string, sourceCode: string) {
const host = ts.createCompilerHost({});
const originalGetSourceFile = host.getSourceFile;
const virtualFileName = 'virtual.ts';
Expand All @@ -90,7 +90,7 @@ function createVirtualCompilerHost(sourcePath: string, sourceCode: string): ts.C
return host;
}

function walkAst(node: ts.Node, callback: (node: ts.Node) => void): void {
function walkAst(node: ts.Node, callback: (node: ts.Node) => void) {
ts.forEachChild(node, (childNode) => {
callback(childNode);
walkAst(childNode, callback);
Expand Down

0 comments on commit 0a2e3cb

Please sign in to comment.