Skip to content

Commit

Permalink
Improve signature
Browse files Browse the repository at this point in the history
  • Loading branch information
manzoorwanijk committed Nov 6, 2024
1 parent c84490b commit c26ee78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/private-apis/src/implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (
* @param object The object to bind the private data to.
* @param privateData The private data to bind to the object.
*/
function lock< T >( object: T, privateData: unknown ) {
function lock( object: unknown, privateData: unknown ) {
if ( ! object ) {
throw new Error( 'Cannot lock an undefined object.' );
}
Expand Down Expand Up @@ -172,7 +172,7 @@ function lock< T >( object: T, privateData: unknown ) {
* @param object The object to unlock the private data from.
* @return The private data bound to the object.
*/
function unlock< T >( object: T ): T {
function unlock< T = any >( object: unknown ): T {
if ( ! object ) {
throw new Error( 'Cannot unlock an undefined object.' );
}
Expand Down

0 comments on commit c26ee78

Please sign in to comment.