TypeScript/tests/cases/fourslash/completionEntryForClassMembers_StaticWhenBaseTypeIsNotResolved.ts
Sheetal Nandi 48e58f44db
Handle unresolved baseType when trying to get completions for static member (#39731)
* Handle unresolved baseType when trying to get completions for static member
Fixes  #38067

* Update src/services/completions.ts

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* correct the condition

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-07-24 16:37:28 -07:00

35 lines
1 KiB
TypeScript

/// <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 {
//// static defau/**/ltProps = {
//// onMouseDown: () => { },
//// onMouseUp: () => { },
//// unit: 'px',
//// }
//// handleChange = () => 10;
//// }
verify.completions({
marker: "",
isNewIdentifierLocation: true,
exact: completion.classElementKeywords,
});