U
U
user_of_toster2021-04-04 16:03:39
typescript
user_of_toster, 2021-04-04 16:03:39

Is there an option to not duplicate object properties?

Is it possible to not duplicate arguments? Instead of

method({arg, arg1, arg2, arg3} : {arg: string, arg1:string, arg2: string, arg3: string}))

Write
method({arg: string, arg1:string, arg2: string, arg3: string}))

This option doesn't work:
method(info: {arg: string, arg1:string, arg2: string, arg3: string}))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sun_Day, 2021-04-04
@user_of_toster

well, for example

{arg, arg1, arg2, arg3}: {[key: string]: string}

//

method(info: {[key: string]: string})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question