Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Typescript support for mixins #9

Closed
jmendiara opened this issue Jan 31, 2017 · 0 comments
Closed

Use Typescript support for mixins #9

jmendiara opened this issue Jan 31, 2017 · 0 comments

Comments

@jmendiara
Copy link
Member

Finally, TS support for mixins has landed in microsoft/TypeScript#13743

Adapt the definitions to it, and drop all the hacks. It will probably cause a Backwards compatibility issue in userland due to the need of incrementing the TS version.

jmendiara added a commit that referenced this issue Apr 24, 2017
Now thanks typescript 2.2 it's not needed to declare the shape for classes created using built-in mixins

Before
```ts
import Therror from 'therror';
import { Classes } from 'therror';

interface MyCustom extends Classes.Loggable, Classes.Namespaced {}
class MyCustom extends Therror.Loggable('info', Therror.Namespaced('MyNS')) {}
```

now
```ts
import Therror from 'therror';

class MyCustom extends Therror.Loggable('info', Therror.Namespaced('MyNS')) {}
```

Breaking changes:
 * Clients with typescript < 2.2 will not be able to read the new definitions

Closes #9
jmendiara added a commit that referenced this issue Apr 24, 2017
Now thanks typescript 2.2 it's not needed to declare the shape for classes created using built-in mixins

Before
```ts
import Therror from 'therror';
import { Classes } from 'therror';

interface MyCustom extends Classes.Loggable, Classes.Namespaced {}
class MyCustom extends Therror.Loggable('info', Therror.Namespaced('MyNS')) {}
```

now
```ts
import Therror from 'therror';

class MyCustom extends Therror.Loggable('info', Therror.Namespaced('MyNS')) {}
```

Breaking changes:
 * Clients with typescript < 2.2 will not be able to read the new definitions

Closes #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant