(options: FormattingRequest)
| 54 | |
| 55 | /** POST /api/format/:formatter */ |
| 56 | export const getFormattedCode = async (options: FormattingRequest) => |
| 57 | await request<FormattingResponse>(`/format/${options.formatterId}`, { |
| 58 | method: 'POST', |
| 59 | headers: { |
| 60 | 'Content-Type': 'application/json', |
| 61 | }, |
| 62 | body: JSON.stringify(_.pick(options, 'source', 'base', 'tabWidth', 'useSpaces')), |
| 63 | }); |