Skip to main content

script_of

Function script_of 

Source
pub fn script_of(path: &str, text: &str) -> String
Expand description

The code of a file as TS: the file itself, or only the <script> blocks of a .vue/.svelte/.astro component. Text outside scripts becomes blank lines so reported line numbers stay right.