Skip to content

Commit

Permalink
fix(platform-cache): remove getInterceptorOptions which is directly a…
Browse files Browse the repository at this point in the history
…vailable from @tsed/di

BREAKING-CHANGE: getInterceptorOptions must be imported from @tsed/di instead of @tsed/platform-cache
  • Loading branch information
Romakita committed Sep 8, 2024
1 parent fc2dfa2 commit 605eeea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion packages/platform/platform-cache/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ export * from "./interfaces/interfaces.js";
export * from "./interfaces/PlatformCachedObject.js";
export * from "./interfaces/PlatformCacheOptions.js";
export * from "./services/PlatformCache.js";
export * from "./utils/getInterceptorOptions.js";
export * from "./utils/getPrefix.js";
export * from "./utils/isEndpoint.js";

This file was deleted.

5 changes: 3 additions & 2 deletions packages/platform/platform-cache/src/utils/getPrefix.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {nameOf, Type} from "@tsed/core";
import {getInterceptorOptions} from "./getInterceptorOptions.js";
import {getInterceptorOptions} from "@tsed/di";
import type {PlatformCacheOptions} from "../interfaces/PlatformCacheOptions.js";

export function getPrefix(target: Type<any>, propertyKey: string | symbol) {
const {prefix} = getInterceptorOptions(target, propertyKey);
const {prefix} = getInterceptorOptions<PlatformCacheOptions>(target, propertyKey);
if (prefix) {
return [prefix];
}
Expand Down

0 comments on commit 605eeea

Please sign in to comment.