improve types

This commit is contained in:
Philipp Kühn
2021-01-28 09:50:17 +01:00
parent a9c14fbddd
commit 4407d9a3d1
20 changed files with 58 additions and 47 deletions

View File

@@ -5,7 +5,7 @@ import { AnyObject } from '../types'
* @param obj Object
* @param key Key to remove
*/
export default function deleteProps(obj: AnyObject, propOrProps: string | string[]) {
export default function deleteProps(obj: AnyObject, propOrProps: string | string[]): AnyObject {
const props = typeof propOrProps === 'string'
? [propOrProps]
: propOrProps