# Syntax highlighting/error display for function arguments that are delegates/functions in typescript

**URL:** <https://forum.alternetsoft.com/t/syntax-highlighting-error-display-for-function-arguments-that-are-delegates-functions-in-typescript/314>\
**Category:** AlterNET Studio Support\
**Created:** [July 15, 2022, 10:56am UTC](https://forum.alternetsoft.com/t/syntax-highlighting-error-display-for-function-arguments-that-are-delegates-functions-in-typescript/314 "2022-07-15T10:56:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DerekDiamond](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/derekdiamond/32/83_2.png) [@DerekDiamond](https://forum.alternetsoft.com/u/DerekDiamond)\
**Post date:** [July 15, 2022, 10:56am UTC](https://forum.alternetsoft.com/t/syntax-highlighting-error-display-for-function-arguments-that-are-delegates-functions-in-typescript/314/1 "2022-07-15T10:56:22Z")

</div>

I am using the Syntax editor for Javascript/Typescript. I am adding .NET objects via the parser.Repository.Project.HostItemsConfiguration.AddObject(name, value);  
The syntax highlighting and error displays work well, except when I have function arguments that are delegates.  
For example I have the following declarations in my C# source:  
public delegate object RowFilterDelegate(Row row);

```
    public RowSet Where(RowFilterDelegate filter)

```

In the syntax editor it always shows that the argument is incorrect as follows:

 ![image](https://forum.alternetsoft.com/uploads/default/original/1X/5dbd7d7f5bb9eee586462e2d0f77494908e2946b.png)

It gives this error in both usages, with an arrow function or using a function straight.

How can I at least make it not mark this as an error?

---

<div class="post-metadata">

**Author:** ![yevgeni.zolotko](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/yevgeni.zolotko/32/25_2.png) [@yevgeni.zolotko](https://forum.alternetsoft.com/u/yevgeni.zolotko)\
**Post date:** [July 18, 2022, 10:19am UTC](https://forum.alternetsoft.com/t/syntax-highlighting-error-display-for-function-arguments-that-are-delegates-functions-in-typescript/314/2 "2022-07-18T10:19:44Z")

</div>

Would it be possible for you to make small application that reproduces this problem and post a link to it here? So we could focus on the exact issue you are experiencing.

---

<div class="post-metadata">

**Author:** ![DerekDiamond](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/derekdiamond/32/83_2.png) [@DerekDiamond](https://forum.alternetsoft.com/u/DerekDiamond)\
**Post date:** [July 20, 2022, 5:08pm UTC](https://forum.alternetsoft.com/t/syntax-highlighting-error-display-for-function-arguments-that-are-delegates-functions-in-typescript/314/3 "2022-07-20T17:08:25Z")

</div>

Hi Yevgeni,

Here is a link to a sample app: [Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.](https://1drv.ms/u/s!Ao3-_UGIVWC02QzAUVfE7r8TW0mn?e=Alamef)

Let me know that it works.  
Thanks Derek

---

<div class="post-metadata">

**Author:** ![yevgeni.zolotko](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/yevgeni.zolotko/32/25_2.png) [@yevgeni.zolotko](https://forum.alternetsoft.com/u/yevgeni.zolotko)\
**Post date:** [July 22, 2022, 7:47am UTC](https://forum.alternetsoft.com/t/syntax-highlighting-error-display-for-function-arguments-that-are-delegates-functions-in-typescript/314/4 "2022-07-22T07:47:26Z")

</div>

Hi Derek,

Thank you for the sample. We had identified and fixed the bug that was causing this problem. The fix will be released within several days as a part of the 8.1.1 version of the NuGet packages.

---

<div class="post-metadata">

**Author:** ![dmitry.medvedev](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/dmitry.medvedev/32/27_2.png) [@dmitry.medvedev](https://forum.alternetsoft.com/u/dmitry.medvedev)\
**Post date:** [July 27, 2022, 10:56pm UTC](https://forum.alternetsoft.com/t/syntax-highlighting-error-display-for-function-arguments-that-are-delegates-functions-in-typescript/314/5 "2022-07-27T22:56:43Z")

</div>

Hi Derek,

We have just uploaded 8.1.1 to NuGet, which now supports delegates in TypeScript Parser/Scripter.

Let us know if you see any issue with it.

Kind regards,  
Dmitry
