webcomponents / webcomponents/custom-elements-manifest

add optional to ClassMember

Open
#35 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
502
Forks
27
PR merge metrics
No merged PRs in 30d

Description

class fields may be optional in implementations, likewise methods

```ts
class Base extends CanErrorElement {
context?: any;

onError?(error: Error, context?: any): void;

thing() {
try {
that()
} catch(e) {
this.onError?.(e, context);
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.