Skip to content

Commit

Permalink
Fix wrong typescript import (#414)
Browse files Browse the repository at this point in the history
* chore: remove settings

* chore: update package lock file

* fix: update injectHttpContext types to generate right ts declaration types

* docs: update changelog
  • Loading branch information
notaphplover authored Dec 4, 2024
1 parent c69e749 commit 126649c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 24 deletions.
19 changes: 0 additions & 19 deletions .vscode/settings.json

This file was deleted.

7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

### Fixed
- Fixed wrong emited typescript delclaration files (#1668).

## [6.4.8]

### Fixed

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

## [6.4.7]

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

### Changed

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

### Fixed

- Change JsonContent to return object rather than string (#379 / #378)
- Change JsonContent to return object rather than string (#379 / #378).
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { TYPE, METADATA_KEY, PARAMETER_TYPE, HTTP_VERBS_ENUM, } from './constant
import type { DecoratorTarget, Middleware, ControllerMetadata, HandlerDecorator, ControllerMethodMetadata, ControllerParameterMetadata, ParameterMetadata, MiddlewareMetaData } from './interfaces';
import { getMiddlewareMetadata, getOrCreateMetadata } from './utils';

export const injectHttpContext = inject(TYPE.HttpContext);
export const injectHttpContext: <T = unknown>(
target: DecoratorTarget,
targetKey?: string | symbol,
indexOrPropertyDescriptor?: number | TypedPropertyDescriptor<T>
) => void = inject(TYPE.HttpContext);

function defineMiddlewareMetadata(
target: DecoratorTarget,
Expand Down

0 comments on commit 126649c

Please sign in to comment.