Skip to content

Commit

Permalink
chore: Update function signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Mar 21, 2024
1 parent 48c3f40 commit 62b5fb3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
Expand Up @@ -6,7 +6,6 @@ export function getKeyword(kind: ReflectionKind) {
[ReflectionKind.Interface]: 'interface',
[ReflectionKind.Enum]: 'enum',
[ReflectionKind.TypeAlias]: 'type',
[ReflectionKind.Function]: 'function',
};
return KEYWORD_MAP[kind];
}
Expand Up @@ -228,7 +228,7 @@ exports[`Objects And Params should compile function returning a promise: (Output
"# Function: functionReturningAPromise()
\`\`\`ts
function functionReturningAPromise(): Promise<{
functionReturningAPromise(): Promise<{
prop: string;
}>
\`\`\`
Expand Down Expand Up @@ -271,7 +271,7 @@ exports[`Objects And Params should compile function returning a union: (Output F
"# Function: functionReturningAUnionType()
\`\`\`ts
function functionReturningAUnionType(): string | boolean | "string1" | "string2"
functionReturningAUnionType(): string | boolean | "string1" | "string2"
\`\`\`
Comments for function
Expand Down Expand Up @@ -317,7 +317,7 @@ exports[`Objects And Params should compile function returning an object: (Output
"# Function: functionReturningAnObject()
\`\`\`ts
function functionReturningAnObject(): {
functionReturningAnObject(): {
x: 1;
y: 2;
}
Expand Down Expand Up @@ -403,7 +403,7 @@ exports[`Objects And Params should compile function with nested parameters: (Out
"# Function: functionWithNestedParameters()
\`\`\`ts
function functionWithNestedParameters(
functionWithNestedParameters(
params: {
name: string;
nestedObj: {
Expand Down
Expand Up @@ -34,7 +34,7 @@ exports[`Function Reflection should compile function returning a function: (Outp
"# functionReturningAFunction()
\`\`\`ts
function functionReturningAFunction(): <T>(x: string) => boolean
functionReturningAFunction(): <T>(x: string) => boolean
\`\`\`
Comments for function
Expand Down Expand Up @@ -94,7 +94,7 @@ exports[`Function Reflection should compile function returning a promise: (Outpu
"# functionReturningAPromise()
\`\`\`ts
function functionReturningAPromise(): Promise<Object>
functionReturningAPromise(): Promise<Object>
\`\`\`
Comments for function
Expand Down Expand Up @@ -139,7 +139,7 @@ exports[`Function Reflection should compile function returning a string: (Output
"# functionReturningAString()
\`\`\`ts
function functionReturningAString(): string
functionReturningAString(): string
\`\`\`
Comments for function
Expand Down Expand Up @@ -179,7 +179,7 @@ exports[`Function Reflection should compile function returning a union: (Output
"# functionReturningAUnionType()
\`\`\`ts
function functionReturningAUnionType(): string | boolean | "string1" | "string2"
functionReturningAUnionType(): string | boolean | "string1" | "string2"
\`\`\`
Comments for function
Expand Down Expand Up @@ -233,7 +233,7 @@ exports[`Function Reflection should compile function returning an object: (Outpu
"# functionReturningAnObject()
\`\`\`ts
function functionReturningAnObject(): Object
functionReturningAnObject(): Object
\`\`\`
Comments for function
Expand Down Expand Up @@ -288,7 +288,7 @@ exports[`Function Reflection should compile function with a parameter: (Output F
"# basicFunction()
\`\`\`ts
function basicFunction(someParam: number): number
basicFunction(someParam: number): number
\`\`\`
This is a function that is assigned to a variable.
Expand Down Expand Up @@ -338,7 +338,7 @@ exports[`Function Reflection should compile function with complex params: (Outpu
"# functionWithComplexParams()
\`\`\`ts
function functionWithComplexParams(paramA: (a: string) => true, paramB: Object): boolean
functionWithComplexParams(paramA: (a: string) => true, paramB: Object): boolean
\`\`\`
Function with function parmas
Expand Down Expand Up @@ -406,7 +406,7 @@ exports[`Function Reflection should compile function with default parameters: (O
"# functionWithDefaultParameters()
\`\`\`ts
function functionWithDefaultParameters(
functionWithDefaultParameters(
valueA: string,
valueB: number,
valueC: number,
Expand Down Expand Up @@ -493,7 +493,7 @@ exports[`Function Reflection should compile function with multiple signatures: (
## functionWithMultipleSignatures(value)
\`\`\`ts
function functionWithMultipleSignatures(value: string): string
functionWithMultipleSignatures(value: string): string
\`\`\`
This is the first signature of a function with multiple signatures.
Expand All @@ -515,7 +515,7 @@ This is the first signature of a function with multiple signatures.
## functionWithMultipleSignatures(value)
\`\`\`ts
function functionWithMultipleSignatures(value: Object): string
functionWithMultipleSignatures(value: Object): string
\`\`\`
This is the second signature of a function with multiple signatures.
Expand Down Expand Up @@ -570,7 +570,7 @@ exports[`Function Reflection should compile function with named params: (Output
"# functionWithNamedParams()
\`\`\`ts
function functionWithNamedParams(__namedParameters: Object, anotherParam: string): void
functionWithNamedParams(__namedParameters: Object, anotherParam: string): void
\`\`\`
## Parameters
Expand Down Expand Up @@ -643,7 +643,7 @@ exports[`Function Reflection should compile function with nested parameters: (Ou
"# functionWithNestedParameters()
\`\`\`ts
function functionWithNestedParameters(
functionWithNestedParameters(
params: Object,
context: any,
somethingElse?: string): boolean
Expand Down Expand Up @@ -742,7 +742,7 @@ exports[`Function Reflection should compile function with optional parameters: (
"# functionWithOptionalParameters()
\`\`\`ts
function functionWithOptionalParameters(
functionWithOptionalParameters(
firstParamWithDefault: boolean,
requiredParam: string,
optionalParam?: string,
Expand Down Expand Up @@ -774,7 +774,7 @@ exports[`Function Reflection should compile function with optional parameters: (
"# functionWithOptionalParameters()
\`\`\`ts
function functionWithOptionalParameters(
functionWithOptionalParameters(
firstParamWithDefault: boolean,
requiredParam: string,
optionalParam?: string,
Expand Down Expand Up @@ -829,7 +829,7 @@ exports[`Function Reflection should compile function with rest params: (Output F
"# functionWithRestParams()
\`\`\`ts
function functionWithRestParams(param: string, ...restParams: string[]): boolean
functionWithRestParams(param: string, ...restParams: string[]): boolean
\`\`\`
Function with reset parmas
Expand Down Expand Up @@ -880,7 +880,7 @@ exports[`Function Reflection should compile function with type parameters: (Outp
"# functionWithTypeParameters()
\`\`\`ts
function functionWithTypeParameters<T, Item>(): boolean
functionWithTypeParameters<T, Item>(): boolean
\`\`\`
Function with type parameters
Expand Down

0 comments on commit 62b5fb3

Please sign in to comment.