Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type checking civet file with ext other than .civet doesn't work #1508

Open
johndeighan opened this issue Oct 24, 2024 · 0 comments
Open

type checking civet file with ext other than .civet doesn't work #1508

johndeighan opened this issue Oct 24, 2024 · 0 comments

Comments

@johndeighan
Copy link

I'm working on developing a variant of civet syntax, so I give my files extensions which are not '.civet'. However, when I try to use the --typecheck option and provide the actual file name, I get an error which I think is because the file extension is not '.civet'. E.g., consider the following file:

let x: string = 42

Let's say I create 2 different files with these same contents, and name them test.civet and test.other. Here is the result of executing civet --typecheck test.civet

$ civet --typecheck test.civet
test.civet.tsx:1:5 - error TS2322: Type 'number' is not assignable to type 'string'.

1 let x: string = 42
      ~

which is what I expect. However, when I execute civet --typecheck test.other, I get:

$ civet --typecheck test.other
TypeError: Cannot read properties of null (reading 'code')
    at cli (C:\Users\johnd\llutils\node_modules\@danielx\civet\dist\civet:562:32)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant