2017-05-03 00:33:13 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @strictNullChecks: true
|
|
|
|
|
2017-05-17 21:51:37 +02:00
|
|
|
// Primitives should be skipped, so `| number | null | undefined` should have no effect on completions.
|
|
|
|
////const x: { a: number, b: number } | { a: string, c: string } | { b: boolean } | number | null | undefined = { /*x*/ };
|
2017-05-03 00:33:13 +02:00
|
|
|
|
|
|
|
////interface I { a: number; }
|
|
|
|
////function f(...args: Array<I | I[]>) {}
|
|
|
|
////f({ /*f*/ });
|
|
|
|
|
2018-10-29 18:03:25 +01:00
|
|
|
verify.completions(
|
|
|
|
{
|
|
|
|
marker: "x",
|
|
|
|
exact: [
|
|
|
|
{ name: "a", text: "(property) a: string | number" },
|
|
|
|
{ name: "b", text: "(property) b: number | boolean" },
|
|
|
|
{ name: "c", text: "(property) c: string"} ,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{ marker: "f", includes: [{ name: "a", text: "(property) I.a: number" }] }, // Also contains array members
|
|
|
|
);
|