Skip to content

Commit

Permalink
Merge pull request #133 from ty-ras/issue/129-remove-qol-improvement
Browse files Browse the repository at this point in the history
#129 Looks like 'never' type just behaves very ba…
  • Loading branch information
stazz authored Feb 14, 2024
2 parents b2fa9f6 + 8be74a0 commit a1899d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion endpoint-spec/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ty-ras/endpoint-spec",
"version": "2.2.2",
"version": "2.2.3",
"author": {
"name": "Stanislav Muhametsin",
"email": "346799+stazz@users.noreply.github.com",
Expand Down
8 changes: 4 additions & 4 deletions endpoint-spec/src/api.types/url.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,10 @@ export type GetMethodArgsGeneric<
TStateSpec,
> = {
state: dataBE.MaterializeRuntimeState<TStateHKT, TStateSpec>;
} & (never extends TServerContext ? {} : { context: TServerContext }) &
(TProtocolSpec extends protocol.ProtocolSpecURL<infer TURLData>
? { url: protocol.RuntimeOf<TURLData> }
: {}) &
context: TServerContext;
} & (TProtocolSpec extends protocol.ProtocolSpecURL<infer TURLData>
? { url: protocol.RuntimeOf<TURLData> }
: {}) &
(TProtocolSpec extends protocol.ProtocolSpecQuery<infer TQuery>
? { query: protocol.RuntimeOf<TQuery> }
: {}) &
Expand Down
2 changes: 1 addition & 1 deletion endpoint-spec/src/implementation/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ function newBuilderGenericImpl<
? processMethodArg
: (pArgs) => {
const boundMethod = processMethodArg(pArgs) ?? pArgs.boundMethod;
return (args) => boundMethod(data.omit(args, "context" as any) as any); // eslint-disable-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unused-vars
return (args) => boundMethod(data.omit(args, "context") as any); // eslint-disable-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unused-vars
};
// Define resetMetadataProviders separately, as defining it inline causes problems with function overload having different argument count.
const resetMetadataProviders: api.ApplicationBuilderGeneric<
Expand Down

0 comments on commit a1899d0

Please sign in to comment.