microsoft / microsoft/node-api-dotnet
TypeScript definition for ValueType not found
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 783
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
When generating JavaScript/TypeScript for a very simple C# struct:
[JSExport] public struct Interface { ...
In the .d.ts file following is generated:
import './System.Collections';
import './System.Runtime';
export class Interface extends ValueType {...
ValueType is unknown to the typescript compiler:
Where is the TypeScript definition for ValueType or how can I avoid the TypeScript compiler error? Obviously there is no issue during runtime.
Is this an issue or do I overlook something?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the simple C# struct with [JSExport] and inspect the generated .d.ts file, especially the Interface declaration and its ValueType reference. Check how the TypeScript compiler resolves the generated imports and determine whether the completed work should provide a ValueType definition or document a way to avoid the compiler error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100