-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
Out of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraintsSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
If in TypeScript your function takes a dictionary of parameters, I often end up writing code like this:
public doStuff({ arg1, arg2, arg3, arg4 }: { arg1: string, arg2: number, arg3: number, arg4?: boolean })
which is not particularly DRY.
My suggestion would be to write the above code like this:
public doStuff({ arg1: string, arg2: number, arg3: number, arg4?: boolean })
I think this would make a lot of code easier to read. Thoughts?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Out of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraintsSuggestionAn idea for TypeScriptAn idea for TypeScript