Skip to content

Commit

Permalink
refactor: allow pass null into analyzeSignature
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Aug 5, 2022
1 parent bfcd710 commit 73d0f03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/apidoc/signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function mdToHtml(md: string): string {

export function analyzeSignature(
signature: SignatureReflection,
moduleName: string,
moduleName: string | null,
methodName: string
): Method {
const parameters: MethodParameter[] = [];
Expand Down
6 changes: 1 addition & 5 deletions test/scripts/apidoc/signature.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ describe('signature', () => {
it.each(Object.keys(expected).sort())('%s', (name) => {
const method = methods[name];
expect(method, `Method ${name} to be defined`).toBeDefined();
const actual = analyzeSignature(
method.signatures[0],
'' /* null */,
method.name
);
const actual = analyzeSignature(method.signatures[0], null, method.name);
actuals[name] = actual;

expect(prettyJson(actual)).toBe(prettyJson(expected[name]));
Expand Down

0 comments on commit 73d0f03

Please sign in to comment.