Skip to content

Commit

Permalink
Fix API baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Hanson committed Mar 1, 2018
1 parent e31b4e9 commit fcdd2a7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
else {
options += " --lib es5";
}
options += " --noUnusedLocals --noUnusedParameters";
options += " --noUnusedLocals --noUnusedParameters --strictNullChecks";

var cmd = host + " " + compilerPath + " " + options + " ";
cmd = cmd + sources.join(" ");
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2792,7 +2792,7 @@ namespace ts {
/**
* Gets the constant value to emit for an expression.
*/
export function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression) {
export function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): string | number | undefined {
const emitNode = node.emitNode;
return emitNode && emitNode.constantValue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/sys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace ts {
declare const global: any;
declare const __filename: string;

export function getNodeMajorVersion() {
export function getNodeMajorVersion(): number | undefined {
if (typeof process === "undefined") {
return undefined;
}
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3777,7 +3777,7 @@ namespace ts {
return overlapStart < overlapEnd;
}

export function textSpanOverlap(span1: TextSpan, span2: TextSpan) {
export function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan | undefined {
const overlapStart = Math.max(span1.start, span2.start);
const overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
if (overlapStart < overlapEnd) {
Expand Down Expand Up @@ -3805,7 +3805,7 @@ namespace ts {
return position <= textSpanEnd(span) && position >= span.start;
}

export function textSpanIntersection(span1: TextSpan, span2: TextSpan) {
export function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan | undefined {
const intersectStart = Math.max(span1.start, span2.start);
const intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
if (intersectStart <= intersectEnd) {
Expand Down
8 changes: 4 additions & 4 deletions tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2896,7 +2896,7 @@ declare namespace ts {
interface FileWatcher {
close(): void;
}
function getNodeMajorVersion(): number;
function getNodeMajorVersion(): number | undefined;
let sys: System;
}
declare namespace ts {
Expand All @@ -2906,12 +2906,12 @@ declare namespace ts {
function textSpanContainsPosition(span: TextSpan, position: number): boolean;
function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean;
function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean;
function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan;
function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan | undefined;
function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean;
function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean;
function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean;
function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean;
function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan;
function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan | undefined;
function createTextSpan(start: number, length: number): TextSpan;
function createTextSpanFromBounds(start: number, end: number): TextSpan;
function textChangeRangeNewSpan(range: TextChangeRange): TextSpan;
Expand Down Expand Up @@ -3797,7 +3797,7 @@ declare namespace ts {
/**
* Gets the constant value to emit for an expression.
*/
function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): string | number;
function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
/**
* Sets the constant value to emit for an expression.
*/
Expand Down

0 comments on commit fcdd2a7

Please sign in to comment.