mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #30598 from DefinitelyTyped/removeReactNodeDependencies
Remove react node dependencies
This commit is contained in:
@@ -371,19 +371,19 @@ Comments.find({ viewNumber: { $gt: 100 } });
|
||||
Comments.find({ viewNumber: { $not: { $lt: 100, $gt: 1000 } } });
|
||||
Comments.find({ tags: { $in: [ "tag-1", "tag-2", "tag-3" ] } });
|
||||
Comments.find({ $or: [ { text: "hello" }, { text: "world" } ] });
|
||||
Comments.find({ $or: [
|
||||
{ text: "hello" },
|
||||
{ text: "world", viewNumber: { $gt: 0 } }
|
||||
Comments.find({ $or: [
|
||||
{ text: "hello" },
|
||||
{ text: "world", viewNumber: { $gt: 0 } }
|
||||
], authorId: "test-author-id" });
|
||||
Comments.find({ $and: [
|
||||
{ $or: [{ authorId: "author-id-1" }, { authorId: "author-id-2" }] },
|
||||
Comments.find({ $and: [
|
||||
{ $or: [{ authorId: "author-id-1" }, { authorId: "author-id-2" }] },
|
||||
{ $or: [{ tags: "tag-1" }, { tags: "tag-2" }] }
|
||||
]});
|
||||
|
||||
Comments.find({ $query: {inlineLinks: { $exists: true, $type: "array" } } });
|
||||
Comments.find({ inlineLinks: { $elemMatch: {
|
||||
objectType: InlineObjectType.Image,
|
||||
objectUrl: { $regex: "https://(www\.?)youtube\.com" }
|
||||
Comments.find({ inlineLinks: { $elemMatch: {
|
||||
objectType: InlineObjectType.Image,
|
||||
objectUrl: { $regex: "https://(www\.?)youtube\.com" }
|
||||
} } });
|
||||
Comments.find({ "inlineLinks.objectType": InlineObjectType.Person });
|
||||
Comments.find({ tags: "tag-1" });
|
||||
|
||||
@@ -383,19 +383,19 @@ Comments.find({ viewNumber: { $gt: 100 } });
|
||||
Comments.find({ viewNumber: { $not: { $lt: 100, $gt: 1000 } } });
|
||||
Comments.find({ tags: { $in: [ "tag-1", "tag-2", "tag-3" ] } });
|
||||
Comments.find({ $or: [ { text: "hello" }, { text: "world" } ] });
|
||||
Comments.find({ $or: [
|
||||
{ text: "hello" },
|
||||
{ text: "world", viewNumber: { $gt: 0 } }
|
||||
Comments.find({ $or: [
|
||||
{ text: "hello" },
|
||||
{ text: "world", viewNumber: { $gt: 0 } }
|
||||
], authorId: "test-author-id" });
|
||||
Comments.find({ $and: [
|
||||
{ $or: [{ authorId: "author-id-1" }, { authorId: "author-id-2" }] },
|
||||
Comments.find({ $and: [
|
||||
{ $or: [{ authorId: "author-id-1" }, { authorId: "author-id-2" }] },
|
||||
{ $or: [{ tags: "tag-1" }, { tags: "tag-2" }] }
|
||||
]});
|
||||
|
||||
Comments.find({ $query: { inlineLinks: { $exists: true, $type: "array" } } });
|
||||
Comments.find({ inlineLinks: { $elemMatch: {
|
||||
objectType: InlineObjectType.Image,
|
||||
objectUrl: { $regex: "https://(www\.?)youtube\.com" }
|
||||
Comments.find({ inlineLinks: { $elemMatch: {
|
||||
objectType: InlineObjectType.Image,
|
||||
objectUrl: { $regex: "https://(www\.?)youtube\.com" }
|
||||
} } });
|
||||
Comments.find({ "inlineLinks.objectType": InlineObjectType.Person });
|
||||
Comments.find({ tags: "tag-1" });
|
||||
|
||||
Vendored
+7
-1
@@ -1,4 +1,10 @@
|
||||
/// <reference types="node" />
|
||||
// forward declarations
|
||||
declare global {
|
||||
namespace NodeJS {
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface ReadableStream {}
|
||||
}
|
||||
}
|
||||
|
||||
import { ReactElement } from 'react';
|
||||
|
||||
|
||||
@@ -14,6 +14,14 @@ import update = require("react-addons-update");
|
||||
import createReactClass = require("create-react-class");
|
||||
import * as DOM from "react-dom-factories";
|
||||
|
||||
// NOTE: forward declarations for tests
|
||||
declare function setInterval(...args: any[]): any;
|
||||
declare function clearInterval(...args: any[]): any;
|
||||
declare var console: Console;
|
||||
interface Console {
|
||||
log(...args: any[]): void;
|
||||
}
|
||||
|
||||
interface Props extends React.Attributes {
|
||||
hello: string;
|
||||
world?: string | null;
|
||||
@@ -501,7 +509,7 @@ class Timer extends React.Component<{}, TimerState> {
|
||||
state = {
|
||||
secondsElapsed: 0
|
||||
};
|
||||
private _interval: NodeJS.Timer;
|
||||
private _interval: number;
|
||||
tick() {
|
||||
this.setState((prevState, props) => ({
|
||||
secondsElapsed: prevState.secondsElapsed + 1
|
||||
|
||||
@@ -11,6 +11,14 @@ import * as TestUtils from "react-addons-test-utils";
|
||||
import TransitionGroup = require("react-addons-transition-group");
|
||||
import update = require("react-addons-update");
|
||||
|
||||
// NOTE: forward declarations for tests
|
||||
declare function setInterval(...args: any[]): any;
|
||||
declare function clearInterval(...args: any[]): any;
|
||||
declare var console: Console;
|
||||
interface Console {
|
||||
log(...args: any[]): void;
|
||||
}
|
||||
|
||||
interface Props extends React.Attributes {
|
||||
hello: string;
|
||||
world?: string;
|
||||
@@ -505,7 +513,7 @@ class Timer extends React.Component<{}, TimerState> {
|
||||
state = {
|
||||
secondsElapsed: 0
|
||||
};
|
||||
private _interval: NodeJS.Timer;
|
||||
private _interval: number;
|
||||
tick() {
|
||||
this.setState((prevState, props) => ({
|
||||
secondsElapsed: prevState.secondsElapsed + 1
|
||||
|
||||
Reference in New Issue
Block a user