mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
Convert yet more import * to import =
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// Typescript adaptation of mithril's test suite.
|
||||
// Not intended to be run; only to compile & check types.
|
||||
|
||||
import * as m from 'mithril';
|
||||
import * as stream from 'mithril/stream';
|
||||
import m = require('mithril');
|
||||
import stream = require('mithril/stream');
|
||||
|
||||
const FRAME_BUDGET = 100;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as m from 'mithril';
|
||||
import m = require('mithril');
|
||||
import { ClassComponent, Vnode, CVnode, CVnodeDOM } from 'mithril';
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as m from 'mithril';
|
||||
import m = require('mithril');
|
||||
|
||||
import { Comp, Component } from 'mithril';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as m from 'mithril';
|
||||
import m = require('mithril');
|
||||
import { Component, FactoryComponent, Vnode } from 'mithril';
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as m from 'mithril';
|
||||
import { Vnode } from 'mithril';
|
||||
import * as h from 'mithril/hyperscript';
|
||||
import h = require('mithril/hyperscript');
|
||||
|
||||
const vnode = m.fragment({id: 'abc'}, ['test']);
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { trust, parseQueryString, buildQueryString } from 'mithril';
|
||||
import * as h from 'mithril/hyperscript';
|
||||
import h = require('mithril/hyperscript');
|
||||
import { render } from 'mithril/render';
|
||||
import { redraw } from 'mithril/redraw';
|
||||
import * as withAttr from 'mithril/withAttr';
|
||||
import withAttr = require('mithril/withAttr');
|
||||
|
||||
const vnode = trust('Some <strong>bold</strong> text.');
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Vnode, Component, Comp, ClassComponent, FactoryComponent, RouteResolver } from 'mithril';
|
||||
import * as h from 'mithril/hyperscript';
|
||||
import * as route from 'mithril/route';
|
||||
import h = require('mithril/hyperscript');
|
||||
import route = require('mithril/route');
|
||||
|
||||
const component1 = {
|
||||
view() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as stream from 'mithril/stream';
|
||||
import stream = require('mithril/stream');
|
||||
import { Stream } from 'mithril/stream';
|
||||
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as createMockRaf from 'mock-raf';
|
||||
import createMockRaf = require('mock-raf');
|
||||
|
||||
const mockRaf = createMockRaf();
|
||||
const id = mockRaf.raf(() => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as moment from 'moment';
|
||||
import moment = require('moment');
|
||||
import 'moment-business-time';
|
||||
|
||||
moment('2015-02-28T10:00:00Z').nextWorkingDay();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as moment from "moment";
|
||||
import moment = require("moment");
|
||||
import * as mb from "moment-business";
|
||||
|
||||
mb.isWeekDay(moment());
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Ali Taheri Moghaddar <https://github.com/alitaheri>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as moment from 'moment';
|
||||
import moment = require('moment');
|
||||
|
||||
export = moment;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as moment from 'moment-jalaali';
|
||||
import moment = require('moment-jalaali');
|
||||
|
||||
moment.loadPersian();
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@
|
||||
// MartynasZilinskas <https://github.com/MartynasZilinskas>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as moment from 'moment';
|
||||
import moment = require('moment');
|
||||
|
||||
export class DateRange {
|
||||
start: moment.Moment;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as moment from "moment";
|
||||
import moment = require("moment");
|
||||
import * as momentRange from "moment-range";
|
||||
|
||||
const range: momentRange.DateRange = new momentRange.DateRange(new Date(2012, 0, 15), new Date(2012, 4, 23));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as moment from 'moment';
|
||||
import moment = require('moment');
|
||||
|
||||
const m = moment();
|
||||
m.round(5, 'seconds');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as move from 'move-concurrently';
|
||||
import move = require('move-concurrently');
|
||||
|
||||
move('/path/to/thing', '/new/path/thing').then(() => {
|
||||
// thing is now moved!
|
||||
@@ -6,7 +6,7 @@ move('/path/to/thing', '/new/path/thing').then(() => {
|
||||
// oh no!
|
||||
});
|
||||
|
||||
import * as Bluebird from 'bluebird';
|
||||
import Bluebird = require('bluebird');
|
||||
|
||||
// tsc version: 2.7.0-dev.20171024
|
||||
// required type arguments!
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as mri from 'mri';
|
||||
import mri = require('mri');
|
||||
|
||||
const first = mri(['--foo', 'bar']);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as multimatch from "multimatch";
|
||||
import multimatch = require("multimatch");
|
||||
|
||||
const options: multimatch.MultimatchOptions = {
|
||||
debug: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as multisort from 'multisort';
|
||||
import multisort = require('multisort');
|
||||
|
||||
const gameShowHosts = [
|
||||
{
|
||||
|
||||
Vendored
+2
-2
@@ -3,8 +3,8 @@
|
||||
// Definitions by: Chi Vinh Le <https://github.com/cvle>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as murmur2 from "./murmurhash2_gc";
|
||||
import * as murmur3 from "./murmurhash3_gc";
|
||||
import murmur2 = require("./murmurhash2_gc");
|
||||
import murmur3 = require("./murmurhash3_gc");
|
||||
|
||||
declare const murmur: typeof murmur3 & {
|
||||
murmur3: typeof murmur3;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as murmur from 'murmurhash-js';
|
||||
import * as murmur2 from 'murmurhash-js/murmurhash2_gc';
|
||||
import * as murmur3 from 'murmurhash-js/murmurhash3_gc';
|
||||
import murmur = require('murmurhash-js');
|
||||
import murmur2 = require('murmurhash-js/murmurhash2_gc');
|
||||
import murmur3 = require('murmurhash-js/murmurhash3_gc');
|
||||
|
||||
let hash: number;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as mv from 'mv';
|
||||
import mv = require('mv');
|
||||
|
||||
() => {
|
||||
mv('/tmp/f1.txt', '/tmp/f2.txt', error => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Hemera from 'nats-hemera';
|
||||
import Hemera = require('nats-hemera');
|
||||
|
||||
const nats = {};
|
||||
const hemera: any = new Hemera(nats, {});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as natsort from "natsort";
|
||||
import natsort = require("natsort");
|
||||
|
||||
const someArr = [2, 5, 3, 4, 1, 'a', 'B'];
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ndarray from 'ndarray';
|
||||
import ndarray = require('ndarray');
|
||||
|
||||
const data = new Int32Array(2 * 2 * 2 + 10);
|
||||
const a = ndarray(data, [2, 2, 2], [1, 2, 4], 5);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as npa from "npm-package-arg";
|
||||
import npa = require("npm-package-arg");
|
||||
|
||||
const result1 = npa("npm-package-arg@5.1");
|
||||
const result2 = npa("npm-package-arg@5.1", "..");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as NsApi from "ns-api";
|
||||
import NsApi = require("ns-api");
|
||||
|
||||
declare var console: { log(msg: any): string };
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as o from 'o.js';
|
||||
import o = require('o.js');
|
||||
import * as Q from "q";
|
||||
|
||||
interface Product {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as objectAssign from 'object-assign';
|
||||
import objectAssign = require('object-assign');
|
||||
|
||||
interface Target {
|
||||
hellow: string;
|
||||
@@ -9,7 +9,7 @@ interface Source1 {
|
||||
}
|
||||
|
||||
interface Result extends Target, Source1 {
|
||||
|
||||
|
||||
}
|
||||
|
||||
interface Source2 {
|
||||
@@ -17,7 +17,7 @@ interface Source2 {
|
||||
}
|
||||
|
||||
interface Result2 extends Result, Source2 {
|
||||
|
||||
|
||||
}
|
||||
|
||||
interface Source3 {
|
||||
@@ -25,7 +25,7 @@ interface Source3 {
|
||||
}
|
||||
|
||||
interface Result3 extends Result2, Source3 {
|
||||
|
||||
|
||||
}
|
||||
|
||||
interface Source4 {
|
||||
@@ -33,7 +33,7 @@ interface Source4 {
|
||||
}
|
||||
|
||||
interface Result4 extends Result3, Source4 {
|
||||
|
||||
|
||||
}
|
||||
|
||||
interface Source5 {
|
||||
@@ -41,7 +41,7 @@ interface Source5 {
|
||||
}
|
||||
|
||||
interface Result5 extends Result4, Source5 {
|
||||
|
||||
|
||||
}
|
||||
|
||||
function assign1(): Result {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Refs from 'object-refs';
|
||||
import Refs = require('object-refs');
|
||||
|
||||
let refs = new Refs({ name: 'wheels', collection: true, enumerable: true }, { name: 'car' });
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as o from 'odata';
|
||||
import o = require('odata');
|
||||
import * as Q from "q";
|
||||
|
||||
interface Product {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as OpenTok from 'opentok';
|
||||
import OpenTok = require('opentok');
|
||||
|
||||
const client = new OpenTok('API_KEY', 'API_SECRET');
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as parent from 'parent-package-json';
|
||||
import parent = require('parent-package-json');
|
||||
|
||||
const hasParent = parent('/optional/path/', 1);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as parse from "parse-link-header";
|
||||
import parse = require("parse-link-header");
|
||||
|
||||
const linkHeader =
|
||||
'<https://api.github.com/user/9287/repos?page=3&per_page=100>; rel="next", ' +
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as password from 'password-hash-and-salt';
|
||||
import password = require('password-hash-and-salt');
|
||||
|
||||
const myuser: { hash: string } = { hash: '' };
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as PhotoSwipeUI_Default from './dist/photoswipe-ui-default/index';
|
||||
import * as PhotoSwipe from './index';
|
||||
import PhotoSwipeUI_Default = require('./dist/photoswipe-ui-default/index');
|
||||
import PhotoSwipe = require('./index');
|
||||
|
||||
function test_defaultUI() {
|
||||
var items: PhotoSwipeUI_Default.Item[] = [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as weight from "pick-weight";
|
||||
import weight = require("pick-weight");
|
||||
|
||||
const x = weight(["a", "b", "c"], [1, 2, 3]);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as pify from 'pify';
|
||||
import pify = require('pify');
|
||||
|
||||
function assert(actual: string, expected: string): void {
|
||||
if (actual !== expected) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference types="jquery" />
|
||||
|
||||
import * as Pikaday from "pikaday-time";
|
||||
import * as moment from "moment";
|
||||
import Pikaday = require("pikaday-time");
|
||||
import moment = require("moment");
|
||||
|
||||
new Pikaday({field: document.getElementById('datepicker')});
|
||||
new Pikaday({field: $('#datepicker')[0]});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference types="jquery" />
|
||||
|
||||
import * as Pikaday from "pikaday";
|
||||
import * as moment from "moment";
|
||||
import Pikaday = require("pikaday");
|
||||
import moment = require("moment");
|
||||
|
||||
new Pikaday({field: document.getElementById('datepicker')});
|
||||
new Pikaday({field: $('#datepicker')[0]});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as redux from 'redux';
|
||||
import makePouchMiddleware, { Document, Path } from 'pouch-redux-middleware';
|
||||
import * as PouchDB from 'pouchdb';
|
||||
import PouchDB = require('pouchdb');
|
||||
|
||||
const types = {
|
||||
DELETE_TODO: 'delete-todo',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as PouchDB from 'pouchdb-core';
|
||||
import PouchDB = require('pouchdb-core');
|
||||
|
||||
function isString(someString: string) {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as PouchDB from 'pouchdb';
|
||||
import PouchDB = require('pouchdb');
|
||||
|
||||
function isString(someString: string) {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as PriorityQueue from 'priorityqueuejs';
|
||||
import PriorityQueue = require('priorityqueuejs');
|
||||
|
||||
var queue = new PriorityQueue<{ cash: number, name: string }>(function(a, b) {
|
||||
return a.cash - b.cash;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as proj4 from 'proj4';
|
||||
import proj4 = require('proj4');
|
||||
|
||||
///////////////////////////////////////////
|
||||
// Tests data initialisation
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as PromiseQueue from 'promise-queue';
|
||||
import PromiseQueue = require('promise-queue');
|
||||
|
||||
PromiseQueue.configure(Promise);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as promptHistory from 'prompt-sync-history';
|
||||
import promptHistory = require('prompt-sync-history');
|
||||
import * as PromptSync from 'prompt-sync';
|
||||
|
||||
let history:PromptSync.History;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as promptSync from 'prompt-sync';
|
||||
import promptSync = require('prompt-sync');
|
||||
|
||||
declare const history: promptSync.History;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Pubnub from 'pubnub';
|
||||
import Pubnub = require('pubnub');
|
||||
|
||||
const console = {
|
||||
log: (params: any) => {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as PureRender from 'pure-render-decorator';
|
||||
import PureRender = require('pure-render-decorator');
|
||||
|
||||
@PureRender
|
||||
class TestClass {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as RangeParser from 'range-parser';
|
||||
import RangeParser = require('range-parser');
|
||||
|
||||
declare var console: { assert(b: boolean): void };
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as Raven from "raven-js";
|
||||
import * as createRavenMiddleware from "raven-for-redux";
|
||||
import createRavenMiddleware = require("raven-for-redux");
|
||||
import { applyMiddleware, createStore } from "redux";
|
||||
|
||||
const middleware = createRavenMiddleware(Raven);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as rbush from 'rbush';
|
||||
import rbush = require('rbush');
|
||||
|
||||
interface IndexedRect extends rbush.BBox {
|
||||
index: number;
|
||||
|
||||
@@ -5,7 +5,7 @@ import DateRangePicker from "react-daterange-picker";
|
||||
import * as ReactDateRangePicker from "react-daterange-picker";
|
||||
|
||||
import * as MomentRange from "moment-range";
|
||||
import * as Moment from "moment";
|
||||
import Moment = require("moment");
|
||||
|
||||
const moment = MomentRange.extendMoment(Moment);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as readPackageTree from "read-package-tree";
|
||||
import readPackageTree = require("read-package-tree");
|
||||
|
||||
readPackageTree("../", (error, data) => {
|
||||
// done
|
||||
|
||||
@@ -2,7 +2,7 @@ import { compose } from "redux";
|
||||
import {
|
||||
default as persistState
|
||||
} from "redux-localstorage";
|
||||
import * as adapter from "redux-localstorage/lib/adapters/localStorage";
|
||||
import adapter = require("redux-localstorage/lib/adapters/localStorage");
|
||||
import { default as debounce } from "redux-localstorage-debounce";
|
||||
|
||||
const storageWait = compose(
|
||||
|
||||
@@ -2,7 +2,7 @@ import { compose } from "redux";
|
||||
import {
|
||||
default as persistState
|
||||
} from "redux-localstorage";
|
||||
import * as adapter from "redux-localstorage/lib/adapters/localStorage";
|
||||
import adapter = require("redux-localstorage/lib/adapters/localStorage");
|
||||
import { default as filter } from "redux-localstorage-filter";
|
||||
|
||||
const storageSingle = compose(
|
||||
|
||||
@@ -5,9 +5,9 @@ import {
|
||||
transformState,
|
||||
actionTypes
|
||||
} from "redux-localstorage";
|
||||
import * as adapterAsyncStorage from "redux-localstorage/lib/adapters/AsyncStorage";
|
||||
import * as adapterLocalStorage from "redux-localstorage/lib/adapters/localStorage";
|
||||
import * as adapterSessionStorage from "redux-localstorage/lib/adapters/sessionStorage";
|
||||
import adapterAsyncStorage = require("redux-localstorage/lib/adapters/AsyncStorage");
|
||||
import adapterLocalStorage = require("redux-localstorage/lib/adapters/localStorage");
|
||||
import adapterSessionStorage = require("redux-localstorage/lib/adapters/sessionStorage");
|
||||
|
||||
const AsyncStorage: any = {};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ioclient from 'socket.io-client';
|
||||
import ioclient = require('socket.io-client');
|
||||
import createSocketIoMiddleware from 'redux-socket.io';
|
||||
import { Action } from 'redux';
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
import * as RelateUrl from 'relateurl';
|
||||
import RelateUrl = require('relateurl');
|
||||
|
||||
var from = "http://www.domain.com/asdf/";
|
||||
var to = "http://www.domain.com/asdf/asdf";
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import resolveFrom = require("resolve-from");
|
||||
|
||||
import resolveFrom1 = require('resolve-from');
|
||||
import * as resolveFrom2 from 'resolve-from';
|
||||
|
||||
let from: string;
|
||||
let moduleId: string;
|
||||
let result: string;
|
||||
|
||||
result = resolveFrom1(from, moduleId);
|
||||
result = resolveFrom2(from, moduleId);
|
||||
result = resolveFrom(from, moduleId);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Route from 'route-parser';
|
||||
import Route = require('route-parser');
|
||||
|
||||
const route = new Route('/users/:id');
|
||||
const matched = route.match('/users/42'); // => { id: '42' }
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
// this test is copied from https://github.com/dylang/node-rss
|
||||
// it basically:
|
||||
//
|
||||
@@ -7,7 +5,7 @@
|
||||
// * add an item to it
|
||||
// * then generates XML string
|
||||
|
||||
import * as RSS from 'rss';
|
||||
import RSS = require('rss');
|
||||
|
||||
var feed = new RSS({
|
||||
title: 'title',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Original test file https://github.com/71104/rwlock/blob/master/test/all.js
|
||||
import * as ReadWriteLock from 'rwlock';
|
||||
import ReadWriteLock = require('rwlock');
|
||||
|
||||
const lock = new ReadWriteLock();
|
||||
lock.readLock((release) => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
import * as sanitize from 'sanitize-html';
|
||||
import sanitize = require('sanitize-html');
|
||||
|
||||
let options: sanitize.IOptions = {
|
||||
allowedTags: sanitize.defaults.allowedTags.concat('h1', 'h2', 'img'),
|
||||
@@ -7,7 +6,7 @@ let options: sanitize.IOptions = {
|
||||
'a': sanitize.defaults.allowedAttributes['a'].concat('rel'),
|
||||
'img': ['src', 'height', 'width', 'alt']
|
||||
},
|
||||
transformTags: {
|
||||
transformTags: {
|
||||
'a': sanitize.simpleTransform('a', { 'rel': 'nofollow' }),
|
||||
'img': (tagName: string, attribs: sanitize.Attributes) => {
|
||||
let img = { tagName, attribs };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as when from 'saywhen';
|
||||
import when = require('saywhen');
|
||||
|
||||
when(jasmine.createSpy('test')); // $ExpectType CallHandler<Spy>
|
||||
when(jasmine.createSpy('test')).isCalled; // $ExpectType Proxy<Spy>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as $script from 'scriptjs';
|
||||
import $script = require('scriptjs');
|
||||
|
||||
const callback = (): void => console.log('done');
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as scrollIntoView from "scroll-into-view"
|
||||
import scrollIntoView = require("scroll-into-view");
|
||||
|
||||
var someElement: HTMLElement
|
||||
scrollIntoView(someElement);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Immutable from 'seamless-immutable';
|
||||
import Immutable = require('seamless-immutable');
|
||||
|
||||
// Test types
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Selectables from "selectables";
|
||||
import Selectables = require("selectables");
|
||||
|
||||
const dr = new Selectables({
|
||||
zone: '#div',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file contains all of the example code that was on http://senecajs.org as of Mon June 16, 2016.
|
||||
*/
|
||||
|
||||
import * as SENECA from 'seneca'
|
||||
import SENECA = require('seneca');
|
||||
var seneca: SENECA.Instance = SENECA()
|
||||
|
||||
seneca.add({ cmd: 'salestax' }, function (args, callback) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as serialize from "serialize-javascript";
|
||||
import serialize = require("serialize-javascript");
|
||||
|
||||
const obj: any = {
|
||||
str: "string",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as sheetify from 'sheetify';
|
||||
import sheetify = require('sheetify');
|
||||
|
||||
function done1(err: Error, css: string, prefix: string) {}
|
||||
function done2(err: Error, css: string) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as shellEscape from 'shell-escape';
|
||||
import shellEscape = require('shell-escape');
|
||||
|
||||
() => {
|
||||
const stringRes = shellEscape(['cp', '-r', 'src/', 'dest/']);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as SparkMD5 from "spark-md5";
|
||||
import SparkMD5 = require("spark-md5");
|
||||
|
||||
SparkMD5.hash('Hi there');
|
||||
SparkMD5.hash('Hi there', true);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Cache from 'stale-lru-cache';
|
||||
import Cache = require('stale-lru-cache');
|
||||
|
||||
const cache = new Cache<string, string>({
|
||||
maxSize: 100,
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import * as stemmer from 'stemmer';
|
||||
import stemmer = require('stemmer');
|
||||
|
||||
stemmer('Working'); // $ExpectType string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as strftime from "strftime";
|
||||
import strftime = require("strftime");
|
||||
|
||||
strftime('%B %d, %Y %H:%M:%S');
|
||||
strftime('%F %T', new Date(1307472705067));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as format from "string-template";
|
||||
import * as compile from "string-template/compile";
|
||||
import format = require("string-template");
|
||||
import compile = require("string-template/compile");
|
||||
|
||||
// Format tests
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as stringifyObject from 'stringify-object';
|
||||
import stringifyObject = require('stringify-object');
|
||||
|
||||
stringifyObject({ a: 1, b: 2, c: 3 });
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
// Type definitions for strip-json-comments
|
||||
// Project: https://github.com/sindresorhus/strip-json-comments
|
||||
// Definitions by: Dylan R. E. Moonfire <https://github.com/dmoonfire/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as stripJsonComments from "strip-json-comments";
|
||||
import stripJsonComments = require("strip-json-comments");
|
||||
|
||||
const json = '{/*rainbows*/"unicorn":"cake"}';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as TestingBot from 'testingbot-api';
|
||||
import TestingBot = require('testingbot-api');
|
||||
|
||||
const sessionId = '123';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Timer from "timer-machine";
|
||||
import Timer = require("timer-machine");
|
||||
|
||||
let myTimer = new Timer();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as toMarkdown from 'to-markdown';
|
||||
import toMarkdown = require('to-markdown');
|
||||
|
||||
// toMarkdown()
|
||||
toMarkdown(`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as tock from 'tocktimer';
|
||||
import tock = require('tocktimer');
|
||||
|
||||
let timer: tock.Tock;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
|
||||
|
||||
import * as moment from 'moment';
|
||||
import moment = require('moment');
|
||||
|
||||
var someMoment = moment("20111031", "YYYYMMDD");
|
||||
var otherMoment = moment("20120620", "YYYYMMDD");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as format from 'tz-format';
|
||||
import format = require('tz-format');
|
||||
|
||||
format();
|
||||
format(1);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as uid from 'uid-safe';
|
||||
import uid = require('uid-safe');
|
||||
|
||||
uid(18, function (err, string) {
|
||||
if (err) throw err
|
||||
// do something with the string
|
||||
// do something with the string
|
||||
});
|
||||
|
||||
uid(18).then(function (string) {
|
||||
// do something with the string
|
||||
// do something with the string
|
||||
})
|
||||
|
||||
var string = uid.sync(18);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as strftime from "ultra-strftime";
|
||||
import strftime = require("ultra-strftime");
|
||||
|
||||
const it_IT = {
|
||||
days: ['domenica', 'lunedi', 'martedi', 'mercoledi', 'giovedi', 'venerdi', 'sabato'],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as UndertakerRegistry from "undertaker-registry";
|
||||
import UndertakerRegistry = require("undertaker-registry");
|
||||
|
||||
const ArgTask = (firstArg: string, secondArg: number) => {
|
||||
// Task
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as uniqid from "uniqid";
|
||||
import uniqid = require("uniqid");
|
||||
|
||||
const uniqueID = uniqid("123");
|
||||
const processString = uniqid.process("123");
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"esModuleInterop": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"files": [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as upperCamelCase from 'uppercamelcase';
|
||||
import upperCamelCase = require('uppercamelcase');
|
||||
|
||||
upperCamelCase('foo-bar');
|
||||
upperCamelCase('foo_bar');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import urljoin = require("url-join");
|
||||
import * as urljoin2 from "url-join";
|
||||
import urljoin2 = require("url-join");
|
||||
|
||||
const s: string = urljoin("foo", "bar", "baz");
|
||||
const s2: string = urljoin2("foo", "bar", "baz");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as urlMetadata from "url-metadata";
|
||||
import urlMetadata = require("url-metadata");
|
||||
|
||||
const opts: urlMetadata.Options = {
|
||||
userAgent: "url-metadata-test",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as valiDate from 'vali-date';
|
||||
import valiDate = require('vali-date');
|
||||
|
||||
valiDate('foo');
|
||||
valiDate('bar');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as Validator from "validatorjs"
|
||||
import Validator = require("validatorjs");
|
||||
|
||||
var rules: any = {
|
||||
foo: "required"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import * as EventBus from "vertx3-eventbus-client";
|
||||
import EventBus = require("vertx3-eventbus-client");
|
||||
|
||||
const eb = new EventBus("http://localhost:9999");
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
// Tests for Video.js API
|
||||
|
||||
import * as videojs from 'video.js';
|
||||
import videojs = require('video.js');
|
||||
|
||||
videojs("example_video_1").ready(function() {
|
||||
// EXAMPLE: Start playing the video.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user