i.e. use "var v: string" instead of "(var) v: string". The parens case should only be used when we're using an english description instead of an actual language construct.
29 lines
No EOL
796 B
TypeScript
29 lines
No EOL
796 B
TypeScript
/// <reference path='fourslash.ts'/>
|
|
|
|
////class CollectionItem {
|
|
//// x: number;
|
|
////}
|
|
|
|
////class Entity extends CollectionItem {
|
|
//// y: number;
|
|
////}
|
|
|
|
////class BaseCollection<TItem extends CollectionItem> {
|
|
//// _itemsByKey: { [key: string]: TItem; };
|
|
////}
|
|
|
|
////class DbSet<TEntity extends Entity> extends BaseCollection<TEntity> { // error
|
|
//// _itemsByKey: { [key: string]: TEntity; };
|
|
////}
|
|
|
|
////var a: BaseCollection<CollectionItem>;
|
|
////var /**/r = a._itemsByKey['x']; // should just say CollectionItem not TItem extends CollectionItem
|
|
////var result = r.x;
|
|
|
|
////a = new DbSet<Entity>();
|
|
////var r2 = a._itemsByKey['x'];
|
|
////var result2 = r2.x;
|
|
|
|
goTo.marker('');
|
|
verify.quickInfoIs('var r: CollectionItem');
|
|
verify.numberOfErrorsInCurrentFile(0); |