Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/services/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,9 @@ namespace ts.Completions {
// List of property symbols of base type that are not private and already implemented
const baseSymbols = flatMap(getAllSuperTypeNodes(decl), baseTypeNode => {
const type = typeChecker.getTypeAtLocation(baseTypeNode);
return type && typeChecker.getPropertiesOfType(classElementModifierFlags & ModifierFlags.Static ? typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl) : type);
return classElementModifierFlags & ModifierFlags.Static ?
type?.symbol && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) :
type && typeChecker.getPropertiesOfType(type);
});
symbols = filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/// <reference path="fourslash.ts" />

// @Filename: /node_modules/@types/react/index.d.ts
//// export = React;
//// export as namespace React;
//// declare namespace React {
//// function createElement(): any;
//// interface Component<P = {}, S = {}, SS = any> { }
//// class Component<P, S> {
//// static contextType?: any;
//// context: any;
//// constructor(props: Readonly<P>);
//// setState<K extends keyof S>(
//// state: ((prevState: Readonly<S>, props: Readonly<P>) => (Pick<S, K> | S | null)) | (Pick<S, K> | S | null),
//// callback?: () => void
//// ): void;
//// }
//// }

// @Filename: /a.ts
//// import React from 'react'
//// class Slider extends React.Component {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React here is unknown because there is no default export

//// static defau/**/ltProps = {
//// onMouseDown: () => { },
//// onMouseUp: () => { },
//// unit: 'px',
//// }
//// handleChange = () => 10;
//// }

verify.completions({
marker: "",
isNewIdentifierLocation: true,
exact: completion.classElementKeywords,
});