-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(user-api): rename methods to reflect rest resource name; dep…
…recate old methods
- Loading branch information
Showing
6 changed files
with
166 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import coreDeprecate from "util-deprecate"; | ||
|
||
/** | ||
* Wrapper arround the util-deprecate deprecate function. | ||
* | ||
* Generates the deprecation proper message. | ||
* | ||
* @param fn - The function to deprecate. | ||
* @param deprecatedFuncName - The name of the deprecated function. | ||
*/ | ||
// eslint-disable-next-line | ||
export function deprecate(fn: Function, deprecatedFuncName: string) { | ||
return coreDeprecate( | ||
fn, | ||
`drupalkit.userApi.${deprecatedFuncName}() is deprecated, use drupalkit.userApi.${fn.name}() instead.`, | ||
); | ||
} |
Oops, something went wrong.