-
-
Couldn't load subscription status.
- Fork 7
Closed
Description
Hey :)
When trying to build my application with your package I ended up with this error:
node_modules/@rsql/ast/dist/index.d.ts:3:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
3 const EQ: "==";
~~~~~
node_modules/@rsql/parser/dist/index.d.ts:7:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
7 function parse(source: string): ExpressionNode;
~~~~~~~~
It surely works when flagging skipLibCheck=true, but is this really wanted?
I now ended up with creating 2 custom typings in my application:
rsql_ast.d.ts:
declare module '@rsql/ast' {...}
rsql_parser.d.ts:
import { ExpressionNode } from '@rsql/ast';
declare module '@rsql/parser' {
function parse(source: string): ExpressionNode;
}
i then was able to remove the skipLibCheck flag from my tsconfig and added the following option to it:
"paths": {
"*": ["node_modules/*"],
"@rsql/ast": ["custom_typings/rsql_ast.d.ts"],
"@rsql/parser": ["custom_typings/rsql_parser.d.ts"]
}
Looking forward to hear from you :)
Metadata
Metadata
Assignees
Labels
No labels