Support for parameters of type RegExp
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 267
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 14
Description
## :rocket: Feature Request
### Affected Languages
- [ ] `TypeScript` or `Javascript`
- [x] `Python`
- [x] `Java`
- [x] .NET (`C#`, `F#`, ...)
### General Information
* **JSII Version:** Any
* **Platform:** any
* [ ] I may be able to implement this feature request
* [ ] This feature might incur a breaking change
### Description
I'd like to use RegExp as input for a method:
```typescript
public foo(bar: RegExp) {
...
}
```
Currently this seems to be impossible, I get this compile error:
```
node_modules/typescript/lib/lib.es5.d.ts:970:13 - error TS9999: JSII: Cannot use private type RegExp in exported declarations
970 declare var RegExp: RegExpConstructor;
```
Contributor guide
Research direction
Start by reproducing the exported `foo(bar: RegExp)` declaration and the TS9999 error reported from `node_modules/typescript/lib/lib.es5.d.ts`. Determine the expected RegExp representation across Python, Java, and .NET, then add coverage showing that exported RegExp parameters are accepted and usable in those runtimes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, java, python, typescript
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100