You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use std::{io, path::Path, process::Command};usecrate::typescript::FormatterFn;/// Format the specified file using [ESLint](https://eslint.org).pubfneslint(file:&Path) -> io::Result<()>{Command::new("eslint").arg("--fix").arg(file).output().map(|_| ()).map_err(|e| io::Error::new(io::ErrorKind::Other, e))}// Assert that the function signature matches the expected type.const _:FormatterFn = eslint;/// Format the specified file using [Prettier](https://prettier.io).pubfnprettier(file:&Path) -> io::Result<()>{Command::new("prettier").arg("--write").arg(file).output().map(|_| ()).map_err(|e| io::Error::new(io::ErrorKind::Other, e))}// Assert that the function signature matches the expected type.const _:FormatterFn = prettier;/// Format the specified file using [Biome](https://prettier.io).pubfnbiome(file:&Path) -> io::Result<()>{Command::new("biome").arg("format").arg(file).output().map(|_| ()).map_err(|e| io::Error::new(io::ErrorKind::Other, e))}// Assert that the function signature matches the expected type.const _:FormatterFn = biome;
usecrate::typescript::{CommentFormatterArgs,CommentFormatterFn};usesuper::js_doc;// Assert that the function signature matches the expected type.const _:CommentFormatterFn = js_doc;/// Converts Typescript comments into JSDoc comments.pubfnjs_doc(arg:CommentFormatterArgs) -> String{js_doc_builder(arg).build()}pub(crate)fnjs_doc_builder(arg:CommentFormatterArgs) -> js_doc::Builder{letmut builder = js_doc::Builder::default();if !arg.docs.is_empty(){
builder.extend(arg.docs.split('\n'));}ifletSome(deprecated) = arg.deprecated{
builder.push_deprecated(deprecated);}
builder
}
The text was updated successfully, but these errors were encountered:
Convert these into documentation:
The text was updated successfully, but these errors were encountered: