| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This reverts commit 813d227.
|
Hi Arthur Ozga (@aozgaa), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
Sorry, something went wrong.
There was a problem hiding this comment.
This isn't exported, so you don't need this.
Sorry, something went wrong.
There was a problem hiding this comment.
Changed.
Sorry, something went wrong.
There was a problem hiding this comment.
Nit: Can you put single quotes around node just so this reads easier? Thanks!
Sorry, something went wrong.
There was a problem hiding this comment.
Changed.
Sorry, something went wrong.
There was a problem hiding this comment.
If you do the other change I suggested (https://github.com/Microsoft/TypeScript/pull/3333/files#r31552915), then this goes away, and ClassExcludes becomes (Value | Type) & ~(ValueModule | Interface)
Sorry, something went wrong.
There was a problem hiding this comment.
why not just letting classes and interfaces merge, and reporting an error later on in CheckClassDeclaration for instance if the class is not ambient? just like we do with merging order for module/class and module/class being in different files.
Sorry, something went wrong.
There was a problem hiding this comment.
should not this be inAmbientContext instead?
Sorry, something went wrong.
|
👍 |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Remove the leading space if you get the chance.
Sorry, something went wrong.
There was a problem hiding this comment.
fixed.
Sorry, something went wrong.
|
There are apparently some issues with the build - you probably need to fix up baselines that don't agree with the merge. |
Sorry, something went wrong.
|
Daniel Rosenwasser (@DanielRosenwasser) The error codes needed to be changed as part of merging the upstream fixes and this broke some of the baselines. No other errors occurred. They've been added now :). |
Sorry, something went wrong.
|
👍 |
Sorry, something went wrong.
|
👍 |
Sorry, something went wrong.
Merged Declarations for Classes and Interfaces
|
This should be added to the Roadmap and What's New In TypeScript page. |
Sorry, something went wrong.
|
How does this work with imported module? When I have like this application.ts import * as amqp from 'amqplib';
// I want to merge declaration with `interface amqp.ExchangeOptions`
interface ExchangeOptions {
'x-recent-history-length' : number;
}
interface amqp.ExchangeOptions {
'x-recent-history-length' : number;
}Which one should work? |
Sorry, something went wrong.
|
Neither one of those would work here. You'd need to do the following: declare module 'amqplib' {
interface ExchangeOptions {
'x-recent-history-length' : number;
}
} |
Sorry, something went wrong.
|
Thanks! |
Sorry, something went wrong.
|
Jason Freeman (@JsonFreeman) Is there an equivalent for external modules? |
Sorry, something went wrong.
|
Asad Saeeduddin (@masaeedu) please see #6213 |
Sorry, something went wrong.
|
This doesn't appear to be possible but feels like it should: interface Foo {
readonly name: string
}
class Foo {
constructor(name: string) {
this.name = name; //error
}
} |
Sorry, something went wrong.
|
Nicholas Bransby-Williams (@nbransby) thanks, I'll open an issue for you. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This implements the proposal in #3332.