This repository was archived by the owner on Nov 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ createSyntaxTree().then((syntaxTree) => {
5050
5151TypeScript types are provided along with this package, and effectively boil down to:
5252
53- ``` js
53+ ``` ts
5454type SyntaxTreeHandler = {
5555 format(source : string ): string ;
5656 parse(source : string ): string ;
@@ -71,25 +71,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/ruby-s
7171## License
7272
7373The package is available as open source under the terms of the [ MIT License] ( https://opensource.org/licenses/MIT ) .
74-
75-
76- import { RubyVM } from " ruby-head-wasm-wasi/dist/index" ;
77- declare type SyntaxTreeHandler = {
78- format (source: string): string;
79- parse (source: string): string;
80- read (filepath: string): string;
81- };
82- export declare type SyntaxTree = {
83- rubyVM : RubyVM ;
84- handlers : Record <"haml " | "ruby ", SyntaxTreeHandler >;
85- };
86- export default function createSyntaxTree (): Promise<SyntaxTree>;
87- export {};
88-
89-
90- test (" handlers.haml.parse" , () => {
91- assert .equal (
92- syntaxTree .handlers .haml .parse (" = foo" ),
93- ` (root children=[(script text=" foo")])\n `
94- );
95- });
You can’t perform that action at this time.
0 commit comments