Hello!
I have been trying to use the @bscotch/gml-parser library as a part of my project. I started with using the example in the documentation given to start a new project by doing the following:
const file = project.getGmlFile("project.gml") // getGmlFile takes in a Pathy object not a string
// LSP information: (method) Project.getGmlFile(path: Pathy<any>): Code | undefined
The actual method contract specifies that it should use a Pathy object. Passing in a string throws this error message:
TypeError: path.relativeFrom is not a function
The documentation shows that a path to the .yyp file is needed, which differs from the actual implementation:
/ Get a GML file in its parsed state. Returns a Code instance,
// which includes various methods for querying/modifying them.
const code = project.getGmlFile(
'/path/to/my/project/scripts/some_script/some_script.gml',
);
Hello!
I have been trying to use the @bscotch/gml-parser library as a part of my project. I started with using the example in the documentation given to start a new project by doing the following:
The actual method contract specifies that it should use a
Pathyobject. Passing in astringthrows this error message:The documentation shows that a path to the .yyp file is needed, which differs from the actual implementation: