Add annotations to unannotated variable declarations [manually-modified]
Reviewed By: panagosg7 Differential Revision: D35948108 fbshipit-source-id: 7d286c9dd66dbd25281e2d831691f8bb34504b5d
This commit is contained in:
Родитель
ff80493d6e
Коммит
0c4c6ca319
|
@ -100,7 +100,7 @@ function parseLine(line: string): ?HermesStackEntry {
|
|||
|
||||
module.exports = function parseHermesStack(stack: string): HermesParsedStack {
|
||||
const lines = stack.split(/\n/);
|
||||
let entries = [];
|
||||
let entries: Array<HermesStackEntryFrame | HermesStackEntrySkipped> = [];
|
||||
let lastMessageLine = -1;
|
||||
for (let i = 0; i < lines.length; ++i) {
|
||||
const line = lines[i];
|
||||
|
|
|
@ -10,14 +10,15 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import type {SpyData} from '../BatchedBridge/MessageQueue';
|
||||
const JSEventLoopWatchdog = require('./JSEventLoopWatchdog');
|
||||
const MessageQueue = require('../BatchedBridge/MessageQueue');
|
||||
|
||||
const MessageQueue = require('../BatchedBridge/MessageQueue');
|
||||
const infoLog = require('../Utilities/infoLog');
|
||||
|
||||
const BridgeSpyStallHandler = {
|
||||
register: function () {
|
||||
let spyBuffer = [];
|
||||
let spyBuffer: Array<SpyData> = [];
|
||||
MessageQueue.spy(data => {
|
||||
spyBuffer.push(data);
|
||||
});
|
||||
|
@ -27,7 +28,7 @@ const BridgeSpyStallHandler = {
|
|||
infoLog(
|
||||
spyBuffer.length + ' bridge messages during stall: ',
|
||||
spyBuffer.map(info => {
|
||||
let args = '<args>';
|
||||
let args: string | Array<?string> = '<args>';
|
||||
try {
|
||||
args = JSON.stringify(info.args);
|
||||
} catch (e1) {
|
||||
|
|
|
@ -154,7 +154,7 @@ const _interactionSet = new Set();
|
|||
const _addInteractionSet = new Set();
|
||||
const _deleteInteractionSet = new Set();
|
||||
const _taskQueue = new TaskQueue({onMoreTasks: _scheduleUpdate});
|
||||
let _nextUpdateHandle = 0;
|
||||
let _nextUpdateHandle: $FlowFixMe | TimeoutID = 0;
|
||||
let _inc = 0;
|
||||
let _deadline = -1;
|
||||
|
||||
|
|
|
@ -1128,7 +1128,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|||
)}
|
||||
</VirtualizedListContextProvider>
|
||||
);
|
||||
let ret = innerRet;
|
||||
let ret: React.Node = innerRet;
|
||||
if (__DEV__) {
|
||||
ret = (
|
||||
<ScrollView.Context.Consumer>
|
||||
|
@ -1742,7 +1742,10 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|||
return;
|
||||
}
|
||||
this.setState(state => {
|
||||
let newState;
|
||||
let newState: ?(
|
||||
| {first: number, last: number, ...}
|
||||
| $TEMPORARY$object<{first: number, last: number}>
|
||||
);
|
||||
const {contentLength, offset, visibleLength} = this._scrollMetrics;
|
||||
if (!isVirtualizationDisabled) {
|
||||
// If we run this with bogus data, we'll force-render window {first: 0, last: 0},
|
||||
|
@ -2109,7 +2112,7 @@ function describeNestedLists(childList: {
|
|||
` listKey: ${childList.key}\n` +
|
||||
` cellKey: ${childList.cellKey}`;
|
||||
|
||||
let debugInfo = childList.parentDebugInfo;
|
||||
let debugInfo: ?ListDebugInfo = childList.parentDebugInfo;
|
||||
while (debugInfo) {
|
||||
trace +=
|
||||
`\n Parent (${debugInfo.horizontal ? 'horizontal' : 'vertical'}):\n` +
|
||||
|
|
|
@ -156,7 +156,7 @@ function appendNewLog(newLog) {
|
|||
// sybolication for up to a second before adding the log.
|
||||
const OPTIMISTIC_WAIT_TIME = 1000;
|
||||
|
||||
let addPendingLog = () => {
|
||||
let addPendingLog: ?() => void = () => {
|
||||
logs.add(newLog);
|
||||
if (_selectedIndex < 0) {
|
||||
setSelectedLog(logs.size - 1);
|
||||
|
|
|
@ -88,7 +88,7 @@ class AppContainer extends React.Component<Props, State> {
|
|||
}
|
||||
}
|
||||
|
||||
let innerView = (
|
||||
let innerView: React.Node = (
|
||||
<View
|
||||
collapsable={!this.state.inspector}
|
||||
key={this.state.mainKey}
|
||||
|
|
|
@ -43,7 +43,10 @@ export function createStringifySafeWithLimits(limits: {|
|
|||
return value;
|
||||
}
|
||||
|
||||
let retval = value;
|
||||
let retval:
|
||||
| string
|
||||
| {+[string]: mixed}
|
||||
| $TEMPORARY$object<{'...(truncated keys)...': number}> = value;
|
||||
if (Array.isArray(value)) {
|
||||
if (stack.length >= maxDepth) {
|
||||
retval = `[ ... array with ${value.length} values ... ]`;
|
||||
|
|
|
@ -230,7 +230,7 @@ class WebSocket extends (EventTarget(...WEBSOCKET_EVENTS): any) {
|
|||
if (ev.id !== this._socketId) {
|
||||
return;
|
||||
}
|
||||
let data = ev.data;
|
||||
let data: Blob | BlobData | ArrayBuffer | string = ev.data;
|
||||
switch (ev.type) {
|
||||
case 'binary':
|
||||
data = base64.toByteArray(ev.data).buffer;
|
||||
|
|
|
@ -195,7 +195,7 @@ class ArrayProperty extends Property {
|
|||
|
||||
getFullCppType(): string {
|
||||
let elemType: string = 'folly::dynamic';
|
||||
let recursive = false;
|
||||
let recursive: ?(false | boolean) = false;
|
||||
|
||||
if (this.items) {
|
||||
if (this.items.type) {
|
||||
|
|
|
@ -228,7 +228,7 @@ class CheckboxExample extends React.Component<
|
|||
};
|
||||
|
||||
_onCheckboxPress = () => {
|
||||
let checkboxState = false;
|
||||
let checkboxState: boolean | $TEMPORARY$string<'mixed'> = false;
|
||||
if (this.state.checkboxState === false) {
|
||||
checkboxState = 'mixed';
|
||||
} else if (this.state.checkboxState === 'mixed') {
|
||||
|
|
Загрузка…
Ссылка в новой задаче