# Error in generated Typescript

**URL:** https://discuss.codemirror.net/t/error-in-generated-typescript/7382
**Category:** Lezer
**Created:** [November 7, 2023, 9:00pm UTC](https://discuss.codemirror.net/t/error-in-generated-typescript/7382 "2023-11-07T21:00:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jpelay](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/jpelay/32/3716_2.png) [@jpelay](https://discuss.codemirror.net/u/jpelay)
#### Post date: [November 7, 2023, 9:00pm UTC](https://discuss.codemirror.net/t/error-in-generated-typescript/7382/1 "2023-11-07T21:00:02Z")

</div>

Hi! I’m currently trying to generate a parser in Typescript, but the option is either not working or I don’t know how to use it.

I’m using the command line too `lezer-generator` to generate my grammars, this is the command I’m using:

```auto
npx lezer-generator --typeScript level17.grammar -o level17-parser.ts

```

But when generating the parser and then trying to compile the resulting TypeScript, it tells me this:

```auto
level17-parser.ts:20:87 - error TS2554: Expected 1 arguments, but got 2.

20 specialized: [{term: 36, get: (value: any, stack: any) => (specializeKeyword(value, stack) << 1), external: specializeKeyword},{term: 36, get: (value: any, stack: any) => (extendKeyword(value, stack) << 1) | 1, external: extendKeyword, extend: true}],

```

I’m using two custom specializers `specializeKeyword` and `extendKeyword`, and maybe that has something to do? The code does work, but when trying to compile it, is just Typescript that returns this error. Any help would be appreciated

---

<div class="post-metadata">

### Author: ![jpelay](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/jpelay/32/3716_2.png) [@jpelay](https://discuss.codemirror.net/u/jpelay)
#### Post date: [November 7, 2023, 9:06pm UTC](https://discuss.codemirror.net/t/error-in-generated-typescript/7382/2 "2023-11-07T21:06:25Z")

</div>

Nevermind! It was actually my own fault for not providing a second argument to my specializer! My apologies.

Also, I’ve been working with Lezer for the past month and is been truly amazing, love Lezer and CodeMirror.
