Skip to content

Commit 126649c

Browse files
authored
Fix wrong typescript import (#414)
* chore: remove settings * chore: update package lock file * fix: update injectHttpContext types to generate right ts declaration types * docs: update changelog
1 parent c69e749 commit 126649c

File tree

4 files changed

+10
-24
lines changed

4 files changed

+10
-24
lines changed

.vscode/settings.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Changed
1313

1414
### Fixed
15+
- Fixed wrong emited typescript delclaration files (#1668).
1516

1617
## [6.4.8]
1718

1819
### Fixed
1920

20-
- Fixed can't set headers after they are sent (#255 / #412)
21+
- Fixed can't set headers after they are sent (#255 / #412).
2122

2223
## [6.4.7]
2324

@@ -31,8 +32,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3132

3233
### Changed
3334

34-
- Update dependencies (`minimist`, `json5`, `@babel/traverse`, `tough-cookie`, `ansi-regex`, `cookiejar`, `express`, `decode-uri-component`)
35+
- Update dependencies (`minimist`, `json5`, `@babel/traverse`, `tough-cookie`, `ansi-regex`, `cookiejar`, `express`, `decode-uri-component`).
3536

3637
### Fixed
3738

38-
- Change JsonContent to return object rather than string (#379 / #378)
39+
- Change JsonContent to return object rather than string (#379 / #378).

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/decorators.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import { TYPE, METADATA_KEY, PARAMETER_TYPE, HTTP_VERBS_ENUM, } from './constant
33
import type { DecoratorTarget, Middleware, ControllerMetadata, HandlerDecorator, ControllerMethodMetadata, ControllerParameterMetadata, ParameterMetadata, MiddlewareMetaData } from './interfaces';
44
import { getMiddlewareMetadata, getOrCreateMetadata } from './utils';
55

6-
export const injectHttpContext = inject(TYPE.HttpContext);
6+
export const injectHttpContext: <T = unknown>(
7+
target: DecoratorTarget,
8+
targetKey?: string | symbol,
9+
indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>
10+
) => void = inject(TYPE.HttpContext);
711

812
function defineMiddlewareMetadata(
913
target: DecoratorTarget,

0 commit comments

Comments
 (0)