Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Throw on edge record, too.
import { FactRecord, FactReference } from '../storage'; export type EdgeRecord = { predecessor_hash: string, predecessor_type: string, successor_hash: string, successor_type: string, role: string }; function makeEdgeRecord(predecessor: FactReference, successor: FactRecord, role: string): EdgeRecor...
import { FactRecord, FactReference } from '../storage'; export type EdgeRecord = { predecessor_hash: string, predecessor_type: string, successor_hash: string, successor_type: string, role: string }; function makeEdgeRecord(predecessor: FactReference, successor: FactRecord, role: string): EdgeRecor...
Drop context and replace it with HOC
import * as invariant from "invariant"; import * as PropTypes from "prop-types"; import * as React from "react"; interface NavigatorProps { children: (( navigate: (url: string, replace?: boolean, preserveQs?: boolean) => any ) => React.ReactElement<any>); } const Navigator: React.StatelessComponent<NavigatorP...
import * as React from "react"; import { RouteComponentProps, withRouter } from "react-router"; interface NavigatorProps { children: ( navigate: (url: string, replace?: boolean, preserveQs?: boolean) => any ) => React.ReactElement<any>; } const Navigator = withRouter<NavigatorProps & RouteComponentProps<any>>...
Fix missing module import of
import { NgModule } from '@angular/core'; import { AdjustMarginDirective, Display1Directive, Display2Directive, Display3Directive, Display4Directive, HeadlineDirective, TitleDirective, Subheading1Directive, Subheading2Directive, Body1Directive, Body2Directive, CaptionDirective } from './typography.directiv...
import { NgModule } from '@angular/core'; import { Typography, AdjustMarginDirective, Display1Directive, Display2Directive, Display3Directive, Display4Directive, HeadlineDirective, TitleDirective, Subheading1Directive, Subheading2Directive, Body1Directive, Body2Directive, CaptionDirective } f...
Throw error if no options
/// <reference path="../typings/node/node.d.ts" /> import * as fs from 'fs'; export class Dependument { private source: string; private output: string; constructor(options: any) { if (!options.source) { throw new Error("No source path specified in options"); } if (!options.output) { th...
/// <reference path="../typings/node/node.d.ts" /> import * as fs from 'fs'; export class Dependument { private source: string; private output: string; constructor(options: any) { if (!options) { throw new Error("No options provided"); } if (!options.source) { throw new Error("No sourc...
Remove random loadout from angular
import { module } from 'angular'; import { LoadoutDrawerComponent } from './loadout-drawer.component'; import { LoadoutPopupComponent } from './loadout-popup.component'; import { react2angular } from 'react2angular'; import RandomLoadoutButton from './random/RandomLoadoutButton'; export default module('loadoutModule'...
import { module } from 'angular'; import { LoadoutDrawerComponent } from './loadout-drawer.component'; import { LoadoutPopupComponent } from './loadout-popup.component'; export default module('loadoutModule', []) .component('dimLoadoutPopup', LoadoutPopupComponent) .component('loadoutDrawer', LoadoutDrawerCompone...
Remove the dev tools opening by default
import {app, BrowserWindow} from "electron"; let win; function createWindow() { win = new BrowserWindow({ width: 800, height: 600 }); win.loadURL(`file://${__dirname}/app/view/index.html`); // win.webContents.openDevTools(); win.on("closed", () => { win = null; }); } app.on("ready", cr...
import {app, BrowserWindow} from "electron"; let win; function createWindow() { win = new BrowserWindow({ width: 800, height: 600 }); win.loadURL(`file://${__dirname}/app/view/index.html`); win.on("closed", () => { win = null; }); } app.on("ready", createWindow); app.on("window-all-closed"...
Add missing export of RLPObject
import BN = require('bn.js') export type RLPInput = Buffer | string | number | Uint8Array | BN | RLPObject | RLPArray | null export interface RLPArray extends Array<RLPInput> {} interface RLPObject { [x: string]: RLPInput } export interface RLPDecoded { data: Buffer | Buffer[] remainder: Buffer }
import BN = require('bn.js') export type RLPInput = Buffer | string | number | Uint8Array | BN | RLPObject | RLPArray | null export interface RLPArray extends Array<RLPInput> {} export interface RLPObject { [x: string]: RLPInput } export interface RLPDecoded { data: Buffer | Buffer[] remainder: Buffer }
Move hasOwnProperty to the last export
export * from './types' export * from './clone' export * from './hasOwnProperty' export * from './invoker' export * from './isEmpty' export * from './keys' export * from './length' export * from './lensPath' export * from './lensProp' export * from './path' export * from './prop' export * from './set' export * from '....
export * from './types' export * from './clone' export * from './invoker' export * from './isEmpty' export * from './keys' export * from './length' export * from './lensPath' export * from './lensProp' export * from './path' export * from './prop' export * from './set' export * from './values' // export last to avoid ...
Add types to enforce the function returning a number
import Css from '../properties/Css'; import Dimension from '../../impl/Dimension'; import Element from '../node/Element'; var api = Dimension('width', function (element: Element) { // IMO passing this function is better than using dom['offset' + 'width'] return element.dom().offsetWidth; }); var set = function (e...
import Css from '../properties/Css'; import Dimension from '../../impl/Dimension'; import Element from '../node/Element'; import { HTMLElement } from '@ephox/dom-globals'; var api = Dimension('width', function (element: Element) { // IMO passing this function is better than using dom['offset' + 'width'] return (el...
Add 'editable' to MapField class
export class MapField { label: string; namespace: string; name: string; uri: string; guidelines: string; source: string; definition: string; obligation: string; range: any; repeatable: boolean; input: string; visible: boolean; }
export class MapField { label: string; namespace: string; name: string; uri: string; guidelines: string; source: string; definition: string; obligation: string; range: any; repeatable: boolean; input: string; visible: boolean; editable: boolean; }
Add more language config settings for indent, etc.
import * as vscode from 'vscode'; import * as client from './client'; export function activate(context: vscode.ExtensionContext) { context.subscriptions.push(client.launch(context)); } export function deactivate() { }
import * as vscode from 'vscode'; import * as client from './client'; export function activate(context: vscode.ExtensionContext) { context.subscriptions.push( vscode.languages.setLanguageConfiguration('reason', { indentationRules: { decreaseIndentPattern: /^(.*\*\/)?\s*\}.*$/, increaseInden...
Fix default import of remove-markdown.
import * as React from "react" import * as Relay from "react-relay/classic" import * as removeMarkdown from "remove-markdown" import { Dimensions, StyleSheet, View, ViewProperties } from "react-native" import SerifText from "../Text/Serif" const sideMargin = Dimensions.get("window").width > 700 ? 50 : 0 interface P...
import * as React from "react" import * as Relay from "react-relay/classic" import removeMarkdown from "remove-markdown" import { Dimensions, StyleSheet, View, ViewProperties } from "react-native" import SerifText from "../Text/Serif" const sideMargin = Dimensions.get("window").width > 700 ? 50 : 0 interface Props ...
Fix for the resource not loading on the Integration Server
module app.core.metaschema { import IHttpPromise = angular.IHttpPromise; import IPromise = angular.IPromise; import IQService = angular.IQService; import IDeferred = angular.IDeferred; import DataschemaService = app.core.dataschema.DataschemaService; export class MetaschemaService { s...
module app.core.metaschema { import IHttpPromise = angular.IHttpPromise; import IPromise = angular.IPromise; import IQService = angular.IQService; import IDeferred = angular.IDeferred; import DataschemaService = app.core.dataschema.DataschemaService; export class MetaschemaService { s...
Remove func property from SearchOption
/* * searchoption.js * * encapsulates a search option */ "use strict"; interface SettingsFunc { (): void; } export class SearchOption { shortarg: string; longarg: string; desc: string; func: SettingsFunc; public sortarg: string; constructor(shortarg: string, longarg: string, desc: st...
/* * searchoption.js * * encapsulates a search option */ "use strict"; export class SearchOption { shortarg: string; longarg: string; desc: string; public sortarg: string; constructor(shortarg: string, longarg: string, desc: string) { this.shortarg = shortarg; this.longarg = l...
Use shorthand expression for variable assignment in createCommandRegex
import escapeStringRegexp = require('escape-string-regexp'); import { Command } from '../chat-service/command'; export function createCommandRegex(commands: string[], rootCommand = false): RegExp { let beginning = ''; let end = ''; if (rootCommand) { beginning = '^'; end = '$'; } ...
import escapeStringRegexp = require('escape-string-regexp'); import { Command } from '../chat-service/command'; export function createCommandRegex(commands: string[], rootCommand = false): RegExp { const beginning = rootCommand ? '^' : ''; const end = rootCommand ? '$' : ''; return new RegExp(`${beginnin...
Add missing properties in getGlobalContext.organizationSettings
export class OrganizationSettingsMock implements Xrm.OrganizationSettings { public baseCurrencyId: string; public defaultCountryCode: string; public isAutoSaveEnabled: boolean; public languageId: number; public organizationId: string; public uniqueName: string; public useSkypeProtocol: boolean; constru...
export class OrganizationSettingsMock implements Xrm.OrganizationSettings { public baseCurrencyId: string; public defaultCountryCode: string; public isAutoSaveEnabled: boolean; public languageId: number; public organizationId: string; public uniqueName: string; public useSkypeProtocol: boolean; public b...
Add helpful error message for VaaS MFA users
import {Command} from '@heroku-cli/command' import * as Heroku from '@heroku-cli/schema' import ux from 'cli-ux' export default class Auth2faGenerate extends Command { static description = 'disables 2fa on account' static aliases = [ 'twofactor:disable', '2fa:disable', ] static example = `$ heroku au...
import {Command} from '@heroku-cli/command' import * as Heroku from '@heroku-cli/schema' import ux from 'cli-ux' export default class Auth2faGenerate extends Command { static description = 'disables 2fa on account' static aliases = [ 'twofactor:disable', '2fa:disable', ] static example = `$ heroku au...
Add unit tests for min decorator
import { Min } from './../../src/'; describe('LoggerMethod decorator', () => { it('should assign a valid value (greater or equals than min value)', () => { class TestClassMinValue { @Min(5) myNumber: number; } let testClass = new TestClassMinValue(); testCl...
import { Min } from './../../src/'; describe('LoggerMethod decorator', () => { it('should assign a valid value (greater or equals than min value)', () => { class TestClassMinValue { @Min(5) myNumber: number; } let testClass = new TestClassMinValue(); let va...
Apply initial state (concact) if provided so that even if no actions sent yet, the initial state is provided to subscribers.
import { Flow } from './Flow'; import { Soak, completeSoak } from './Soak'; import { Observable, Subject } from 'rxjs'; /** * The dispatch and state that comprises a dw Store. */ export type Store<State, Action> = { dispatch$: Subject<Action>; state$: Observable<State>; }; /** * Links a flow, soak and init...
import { Flow } from './Flow'; import { Soak, completeSoak } from './Soak'; import { Observable, Subject } from 'rxjs'; /** * The dispatch and state that comprises a dw Store. */ export type Store<State, Action> = { /** dispatch actions into the store */ dispatch$: Subject<Action>; /** observable of acti...
Tweak resolving location of tree-sitter-ruby.wasm
import path from 'path'; import Parser from 'web-tree-sitter'; const TREE_SITTER_RUBY_WASM = path.resolve(__dirname, 'tree-sitter-ruby.wasm'); const TreeSitterFactory = { language: null, async initalize(): Promise<void> { await Parser.init(); console.debug(`Loading Ruby tree-sitter syntax from ${TREE_SITTER_RU...
import path from 'path'; import fs from 'fs'; import Parser from 'web-tree-sitter'; const TREE_SITTER_RUBY_WASM = ((): string => { let wasmPath = path.resolve(__dirname, 'tree-sitter-ruby.wasm'); if (!fs.existsSync(wasmPath)) { wasmPath = path.resolve(__dirname, '..', 'tree-sitter-ruby.wasm'); } return wasmPath...
Remove ConnectToServerOptions interface in favor of shorter ConnectOptions
/// <reference path="includes.ts"/> /// <reference path="stringHelpers.ts"/> namespace Core { /** * Typescript interface that represents the UserDetails service */ export interface UserDetails { username: String password: String loginDetails?: Object } /** * Typescript interface that repr...
/// <reference path="includes.ts"/> /// <reference path="stringHelpers.ts"/> namespace Core { /** * Typescript interface that represents the UserDetails service */ export interface UserDetails { username: String password: String loginDetails?: Object } /** * Typescript interface that repr...
Add error message service test
import { TestBed, inject } from '@angular/core/testing'; import { ErrorMessageService } from './error-message.service'; describe('ErrorMessageService', () => { beforeEach(() => { TestBed.configureTestingModule({ providers: [ErrorMessageService] }); }); it('should ...', inject([ErrorMessageService...
import {inject, TestBed} from "@angular/core/testing"; import {ErrorMessageService} from "./error-message.service"; import {CUSTOM_ERROR_MESSAGES} from "../Tokens/tokens"; import {errorMessageService} from "../ng-bootstrap-form-validation.module"; describe('ErrorMessageService', () => { const customRequiredErrorM...
Update how the query string is generated
import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/toPromise'; import { environment } from '../../../environments/environment'; import { Hero, HeroUniverse, HeroRole } from '../models'...
import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/toPromise'; import { environment } from '../../../environments/environment'; import { Hero, HeroUniverse, HeroRole } from '../models'...
Refresh cake counter when a cake is added
import * as React from "react"; import { CakeProps } from "./Cake.tsx"; import { CakeListProps } from "./CakeList.tsx"; interface CakeCounterState { daysSinceLastCake: number; } class CakeCounter extends React.Component<CakeListProps, CakeCounterState> { constructor(props: CakeListProps) { super(props...
import * as React from "react"; import { CakeProps } from "./Cake.tsx"; import { CakeListProps } from "./CakeList.tsx"; interface CakeCounterState { daysSinceLastCake: number; } class CakeCounter extends React.Component<CakeListProps, CakeCounterState> { constructor(props: CakeListProps) { super(props...
Add gast.TOP_LEVEL to the API
/** * defines the public API of Chevrotain. * changes here may require major version change. (semVer) */ declare var CHEV_TEST_MODE declare var global var testMode = (typeof global === "object" && global.CHEV_TEST_MODE) || (typeof window === "object" && (<any>window).CHEV_TEST_MODE) var API:any = {} /* istanb...
/** * defines the public API of Chevrotain. * changes here may require major version change. (semVer) */ declare var CHEV_TEST_MODE declare var global var testMode = (typeof global === "object" && global.CHEV_TEST_MODE) || (typeof window === "object" && (<any>window).CHEV_TEST_MODE) var API:any = {} /* istanb...
Add basic deletion in history
import * as React from 'react'; import { observer } from 'mobx-react'; import store from '../../store'; import { HistoryItem } from '../../models'; import { formatTime } from '../../utils'; import { Favicon, Item, Remove, Title, Time, Site } from './style'; const onClick = (data: HistoryItem) => (e: React.MouseEvent)...
import * as React from 'react'; import { observer } from 'mobx-react'; import store from '../../store'; import { HistoryItem } from '../../models'; import { formatTime } from '../../utils'; import { Favicon, Item, Remove, Title, Time, Site } from './style'; const onClick = (item: HistoryItem) => (e: React.MouseEvent)...
Add tests for GraphQL mutations
import { gql } from "apollo-server"; import { createTestClient } from "apollo-server-testing"; import { server } from "../src"; describe("Queries", () => { it("returns a list of kernelspecs", async () => { const { query } = createTestClient(server); const kernelspecsQuery = gql` query GetKernels { ...
import { gql } from "apollo-server"; import { createTestClient } from "apollo-server-testing"; import { server } from "../src"; describe("Queries", () => { it("returns a list of kernelspecs", async () => { const { query } = createTestClient(server); const LIST_KERNELSPECS = gql` query GetKernels { ...
Make offering actions button clickable in mobile view.
import * as React from 'react'; import * as Col from 'react-bootstrap/lib/Col'; import * as Row from 'react-bootstrap/lib/Row'; import { OfferingTabsComponent, OfferingTab } from '@waldur/marketplace/details/OfferingTabsComponent'; import { Offering } from '@waldur/marketplace/types'; import { OfferingActions } from ...
import * as React from 'react'; import * as Col from 'react-bootstrap/lib/Col'; import * as Row from 'react-bootstrap/lib/Row'; import { OfferingTabsComponent, OfferingTab } from '@waldur/marketplace/details/OfferingTabsComponent'; import { Offering } from '@waldur/marketplace/types'; import { OfferingActions } from ...
Change the way of rendering App Component
import { render } from 'inferno' import App from './components/app.ts' const container = document.getElementById('app') const app = new App() render(app.render(), container)
import { render } from 'inferno' import h from 'inferno-hyperscript' import App from './components/app.ts' const container = document.getElementById('app') render(h(App), container)
Fix direct load of transforms on URL - another missing global reference to be refactored
import * as logging from './core/log' import * as charts from './charts/core' import * as factory from './models/items/factory' import * as app from './app/app' import * as edit from './edit/edit' import { actions } from './core/action' import GraphiteChartRenderer from './charts/graphite' import FlotChartRe...
import * as logging from './core/log' import * as charts from './charts/core' import * as factory from './models/items/factory' import * as app from './app/app' import * as edit from './edit/edit' import { actions } from './core/action' import { transforms } from './models/transform/transform' impo...
Move division name rendering into getter
import React, {PureComponent} from 'react' import DivisionMenu, { MenuItem, } from 'src/shared/components/threesizer/DivisionMenu' interface Props { onMinimize: () => void onMaximize: () => void buttons: JSX.Element[] menuOptions?: MenuItem[] name?: string } class DivisionHeader extends PureComponent<Prop...
import React, {PureComponent} from 'react' import DivisionMenu, { MenuItem, } from 'src/shared/components/threesizer/DivisionMenu' interface Props { onMinimize: () => void onMaximize: () => void buttons: JSX.Element[] menuOptions?: MenuItem[] name?: string } class DivisionHeader extends PureComponent<Prop...
Update the HttpVerbs enum so intel sense will work with it.
import { IncomingMessage } from 'http'; import { Buffer } from 'buffer'; /** * Simple utility Hash array type */ export type ObjectMap<T> = {[key: string]: T}; /** * A Valid HTTP operation */ export type HttpVerb = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'OPTIONS' | 'PATCH'; /** * Enumaration of valid HTTP verbs. ...
import { IncomingMessage } from 'http'; import { Buffer } from 'buffer'; /** * Simple utility Hash array type */ export type ObjectMap<T> = {[key: string]: T}; /** * A Valid HTTP operation */ export type HttpVerb = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'OPTIONS' | 'PATCH'; /** * Enumaration of valid HTTP verbs. ...
Make schema namespacing optional and added schema identifier
import { GraphQLSchema } from 'graphql'; import { FieldMetadata } from '../extended-schema/extended-schema'; export interface ProxyConfig { endpoints: EndpointConfig[] } interface EndpointConfigBase { namespace: string typePrefix: string fieldMetadata?: {[key: string]: FieldMetadata} url?: string ...
import { GraphQLSchema } from 'graphql'; import { FieldMetadata } from '../extended-schema/extended-schema'; export interface ProxyConfig { endpoints: EndpointConfig[] } interface EndpointConfigBase { namespace?: string typePrefix?: string fieldMetadata?: {[key: string]: FieldMetadata} url?: strin...
Clear field in Redux-Form when field is unmounted
import * as React from 'react'; import { WrappedFieldMetaProps } from 'redux-form'; import { FieldError } from './FieldError'; import { FormField } from './types'; interface FormGroupProps extends FormField { meta: WrappedFieldMetaProps; children: React.ReactChildren; } export const FormGroup = (props: FormGroup...
import * as React from 'react'; // @ts-ignore import { clearFields, WrappedFieldMetaProps } from 'redux-form'; import { FieldError } from './FieldError'; import { FormField } from './types'; interface FormGroupProps extends FormField { meta: WrappedFieldMetaProps; children: React.ReactChildren; } export class Fo...
Fix webpack public path error.
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. // Entry point for the notebook bundle containing custom model definitions. // // Setup notebook base URL // // Some static assets may be required by the custom widget javascript. The base // url for the notebook is ...
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. // Entry point for the notebook bundle containing custom model definitions. // // Setup notebook base URL // // Some static assets may be required by the custom widget javascript. The base // url for the notebook is ...
Update release version to 0.13.1
import { EnvConfig } from './env-config.interface'; const BaseConfig: EnvConfig = { // Sample API url API: 'https://demo.com', RELEASEURL: 'https://github.com/nie-ine/raeber-website/releases/tag/0.13.0', RELEASEVERSION: '0.13.0' }; export = BaseConfig;
import { EnvConfig } from './env-config.interface'; const BaseConfig: EnvConfig = { // Sample API url API: 'https://demo.com', RELEASEURL: 'https://github.com/nie-ine/raeber-website/releases/tag/0.13.1', RELEASEVERSION: '0.13.1' }; export = BaseConfig;
Add blocking to log options
import RoutingServer from './routingserver'; export interface ConfigServer { listenPort: number; routingServers: RoutingServer[]; } export interface LogOptions { clientTimeouts: boolean; clientConnect: boolean; clientDisconnect: boolean; clientError: boolean; tServerConnect: boolean; tServerDisconnect...
import RoutingServer from './routingserver'; export interface ConfigServer { listenPort: number; routingServers: RoutingServer[]; } export interface LogOptions { clientTimeouts: boolean; clientConnect: boolean; clientDisconnect: boolean; clientError: boolean; tServerConnect: boolean; tServerDisconnect...
Remove computed attributes from SKU model
import DS from "ember-data"; import { computed, get } from "@ember/object"; import Price from "./price"; import Product from "./product"; import Bom from "./bom"; import SkuImage from "./sku-image"; import SkuField from "./sku-field"; export default class Sku extends DS.Model { @DS.attr("number") stockQuantity!: num...
import DS from "ember-data"; import Price from "./price"; import Product from "./product"; import Bom from "./bom"; export default class Sku extends DS.Model { @DS.attr("number") stockQuantity!: number; @DS.attr() attrs!: any; @DS.belongsTo("price") price!: Price; @DS.belongsTo("product") product!: Product; ...
Update usage in Welcome wizard
/** The `localStorage` key for whether we've shown the Welcome flow yet. */ const HasShownWelcomeFlowKey = 'has-shown-welcome-flow' /** * Check if the current user has completed the welcome flow. */ export function hasShownWelcomeFlow(): boolean { const hasShownWelcomeFlow = localStorage.getItem(HasShownWelcomeFlo...
import { getBoolean, setBoolean } from './local-storage' /** The `localStorage` key for whether we've shown the Welcome flow yet. */ const HasShownWelcomeFlowKey = 'has-shown-welcome-flow' /** * Check if the current user has completed the welcome flow. */ export function hasShownWelcomeFlow(): boolean { return ge...
Correct development URL to use port 3000 for api
let API_URL: string; API_URL = "http://localhost:3000/api"; export default API_URL;
let API_URL: string; API_URL = `${window.location.protocol}//${window.location.hostname}:3000/api`; export default API_URL;
Save as flag and rename methods.
import * as React from 'react'; import Track from '../model/Track'; import { clear } from '../service'; import './Footer.css'; interface Props extends React.HTMLProps<HTMLDivElement> { tracks: Track[]; } function Footer({ tracks }: Props) { return ( <div className="Footer"> <button ...
import * as React from 'react'; import Track from '../model/Track'; import { clear } from '../service'; import './Footer.css'; interface Props extends React.HTMLProps<HTMLDivElement> { tracks: Track[]; } function Footer({ tracks }: Props) { return ( <div className="Footer"> <button ...
Fix the export for the buffer
import { Stream } from 'most'; export function buffer<T>(count: number): (stream: Stream<T>) => Stream<T[]>; export default buffer;
import { Stream } from 'most'; export default function buffer<T>(count: number): (stream: Stream<T>) => Stream<T[]>;
Add deprecation notice for ofType instance operator
import { Inject, Injectable } from '@angular/core'; import { Action, ScannedActionsSubject } from '@ngrx/store'; import { Observable, Operator, OperatorFunction } from 'rxjs'; import { filter } from 'rxjs/operators'; @Injectable() export class Actions<V = Action> extends Observable<V> { constructor(@Inject(ScannedAc...
import { Inject, Injectable } from '@angular/core'; import { Action, ScannedActionsSubject } from '@ngrx/store'; import { Observable, Operator, OperatorFunction } from 'rxjs'; import { filter } from 'rxjs/operators'; @Injectable() export class Actions<V = Action> extends Observable<V> { constructor(@Inject(ScannedAc...
Allow to terminate ERRED resources.
import { translate } from '@waldur/i18n'; import { marketplaceIsVisible } from '@waldur/marketplace/utils'; import { validateState } from '@waldur/resource/actions/base'; import { ResourceAction } from '@waldur/resource/actions/types'; export default function createAction(ctx): ResourceAction { return { name: 't...
import { translate } from '@waldur/i18n'; import { marketplaceIsVisible } from '@waldur/marketplace/utils'; import { validateState } from '@waldur/resource/actions/base'; import { ResourceAction } from '@waldur/resource/actions/types'; export default function createAction(ctx): ResourceAction { return { name: 't...
Add Authentication to persistStore blacklist
///<reference path="./Interfaces/IStoreCreator.ts" /> import { compose, createStore, applyMiddleware, combineReducers } from 'redux'; import { routerReducer, routerMiddleware } from 'react-router-redux'; import { persistStore, autoRehydrate } from 'redux-persist'; import thunk from 'redux-thunk'; impo...
///<reference path="./Interfaces/IStoreCreator.ts" /> import { compose, createStore, applyMiddleware, combineReducers } from 'redux'; import { routerReducer, routerMiddleware } from 'react-router-redux'; import { persistStore, autoRehydrate } from 'redux-persist'; import thunk from 'redux-thunk'; impo...
Fix setState run before mount
import { Component } from 'react'; import { AppStore } from '../services/'; import { loadAndBundleSpec } from '../utils'; interface SpecProps { specUrl?: string; spec?: object; store?: AppStore; children?: any; } interface SpecState { error?: Error; loading: boolean; store?: AppStore; } export class S...
import { Component } from 'react'; import { AppStore } from '../services/'; import { loadAndBundleSpec } from '../utils'; interface SpecProps { specUrl?: string; spec?: object; store?: AppStore; children?: any; } interface SpecState { error?: Error; loading: boolean; store?: AppStore; } export class S...
Add example of incorrect consumption of enumerable. Test here should be passing
import { Enumerable, ResetableIterator } from '../src/Enumerable'; describe('Enumerable', () => { describe('DefaultIfEmpty', () => { it('Should return itself if sequence has items', () => { const source = Enumerable.Of([1, 2, 3, 4, 5]); const expected = source; const r...
import { Enumerable, ResetableIterator } from '../src/Enumerable'; describe('Enumerable', () => { describe('DefaultIfEmpty', () => { it('Should return itself if sequence has items', () => { const originalSource = [1, 2, 3, 4, 5]; const source = Enumerable.Of(originalSource); ...
Revert "fix image element in post header"
/* eslint-disable @next/next/no-img-element */ import * as React from 'react'; import { Container } from '~/components/layout'; export interface PostHeaderImageProps { src: string; alt?: string; } export const PostHeaderImage: React.FC<PostHeaderImageProps> = ({ alt, src }) => { return ( <section className=...
import Image from 'next/image'; import * as React from 'react'; import { Container } from '~/components/layout'; export interface PostHeaderImageProps { src: string; alt?: string; } export const PostHeaderImage: React.FC<PostHeaderImageProps> = ({ alt, src }) => { return ( <section className="px-4 lg:px-6 p...
Add known values to the type of ImportDesriptor.type as documentation.
/** * @license * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be f...
/** * @license * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be f...
Allow @WatchChanges to trigger original setter and ngOnChanges when setting the same object reference.
import { SimpleChanges, SimpleChange } from '@angular/core'; /** * @hidden */ export function WatchChanges(): PropertyDecorator { return (target: any, key: string, propDesc?: PropertyDescriptor) => { const privateKey = '_' + key.toString(); propDesc = propDesc || { configurable: true, ...
import { SimpleChanges, SimpleChange } from '@angular/core'; /** * @hidden */ export function WatchChanges(): PropertyDecorator { return (target: any, key: string, propDesc?: PropertyDescriptor) => { const privateKey = '_' + key.toString(); propDesc = propDesc || { configurable: true, ...
Add required to sync subQuery
export type Ordering = 'NONE' | 'ASC' | 'DESC'; export interface QueryOrder { field: string; ordering: Ordering; chain?: string[]; } export interface QueryFilters { [attribute: string]: any; } export interface QueryPagination { skip?: number; take?: number; } export interface QueryInclude { [alias: st...
export type Ordering = 'NONE' | 'ASC' | 'DESC'; export interface QueryOrder { field: string; ordering: Ordering; chain?: string[]; } export interface QueryFilters { [attribute: string]: any; } export interface QueryPagination { skip?: number; take?: number; } export interface QueryInclude { [alias: st...
Add delete function and change add name
import { Injectable } from '@angular/core'; import { Http, Response } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import { Map, MapType } from './map'; @Injectable() export class MapService { constructor(private http: Http) { } addMap( title: string = "", height: number, wi...
import { Injectable } from '@angular/core'; import { Http, Response } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import { Map, MapType } from './map'; @Injectable() export class MapService { constructor(private http: Http) { } add( title: string = "", height: number, width...
Remove bootstrap dependency from react store
import { createStore, applyMiddleware } from 'redux'; import 'bootstrap/dist/css/bootstrap.min.css'; import * as _ from 'lodash'; import thunk from 'redux-thunk'; import { createLogger } from 'redux-logger'; import appReducer from './reducers/app'; // import { AppState } from './constants/types'; import { loadState, ...
import { createStore, applyMiddleware } from 'redux'; import * as _ from 'lodash'; import thunk from 'redux-thunk'; import { createLogger } from 'redux-logger'; import appReducer from './reducers/app'; // import { AppState } from './constants/types'; import { loadState, saveState, setLocalUser } from './localStorage'...
Fix redirect from 'home.infrastructure' to 'home.search'
import { module } from 'angular'; import { STATE_CONFIG_PROVIDER, StateConfigProvider } from 'core/navigation/state.provider'; import { SETTINGS } from 'core/config/settings'; export const INFRASTRUCTURE_STATES = 'spinnaker.core.search.states'; module(INFRASTRUCTURE_STATES, [ STATE_CONFIG_PROVIDER ]).config((stateC...
import { module } from 'angular'; import { STATE_CONFIG_PROVIDER, StateConfigProvider } from 'core/navigation/state.provider'; import { SETTINGS } from 'core/config/settings'; export const INFRASTRUCTURE_STATES = 'spinnaker.core.search.states'; module(INFRASTRUCTURE_STATES, [ STATE_CONFIG_PROVIDER ]).config((stateC...
Change initial value of `auth$` behavior subject
import { Injectable } from '@angular/core'; import { Router } from '@angular/router'; import { Observable, Subject, BehaviorSubject } from 'rxjs/Rx'; import { FirebaseAuth, FirebaseAuthState } from 'angularfire2'; @Injectable() export class AuthService { auth$: BehaviorSubject<FirebaseAuthState> = new BehaviorSubjec...
import { Injectable } from '@angular/core'; import { Router } from '@angular/router'; import { Observable, Subject, BehaviorSubject } from 'rxjs/Rx'; import { FirebaseAuth, FirebaseAuthState } from 'angularfire2'; @Injectable() export class AuthService { auth$: BehaviorSubject<FirebaseAuthState> = new BehaviorSubjec...
Fix issues with e2e testing
import { browser, element, by } from '../../node_modules/protractor/built'; describe('grid pager info', () => { let paginator = element(by.tagName('ngb-pagination')).$$('nav').$$('ul').$$('li'), gridPagerInfo = element(by.tagName('grid-pager-info')).$$('div'), pageSizeSelector = element(by.tagNam...
import { browser, element, by } from '../../node_modules/protractor/built'; describe('grid pager info', () => { let paginator = element(by.tagName('ngb-pagination')).$$('nav').$$('ul').$$('li'), gridPagerInfo = element(by.tagName('grid-pager-info')).$$('div'), pageSizeSelector = element(by.tagNam...
Add possibility to use EXTENDEDMIND_API_URL for backend address.
import {Server, Config} from "./server"; /** * Load configuration file given as command line parameter */ let config: Config; if (process.argv.length > 2) { console.info("loading configuration file: " + process.argv[2]); config = require(process.argv[2]); if (process.argv.length > 3) { config.backend = pr...
import {Server, Config} from "./server"; /** * Load configuration file given as command line parameter */ let config: Config; if (process.argv.length > 2) { console.info("loading configuration file: " + process.argv[2]); config = require(process.argv[2]); if (process.argv.length > 3) { config.backend = pr...
Fix core to support strict TS@4.5
import { renderError } from '../../common'; import { IAppController } from '../app.controller.interface'; import { Config } from '../config'; import { Context, HttpResponse } from '../http'; export async function convertErrorToResponse( error: Error, ctx: Context, appController: IAppController, log = console.error )...
import { renderError } from '../../common'; import { IAppController } from '../app.controller.interface'; import { Config } from '../config'; import { Context, HttpResponse } from '../http'; export async function convertErrorToResponse( error: Error, ctx: Context, appController: IAppController, log = console.error )...
Add width for the item
import { AfterViewInit, Component, ElementRef, Input, ViewChild, ViewEncapsulation } from '@angular/core'; /** * This component represents the slide item. */ @Component({ moduleId: module.id, selector: 'ngx-agile-slider-item', template: ` <li #sliderItem class="ngx-agile-slider-item variablewidth"> <...
import { AfterViewInit, Component, ElementRef, Input, ViewChild, ViewEncapsulation } from '@angular/core'; /** * This component represents the slide item. */ @Component({ moduleId: module.id, selector: 'ngx-agile-slider-item', template: ` <li #sliderItem class="ngx-agile-slider-item variablewidth"> <...
Add warning for Node.js 0.10.x deprecation
///<reference path=".d.ts"/> "use strict"; // this call must be first to avoid requiring c++ dependencies require("./common/verify-node-version").verifyNodeVersion(require("../package.json").engines.node); require("./bootstrap"); import * as fiber from "fibers"; import Future = require("fibers/future"); import * as s...
///<reference path=".d.ts"/> "use strict"; let node = require("../package.json").engines.node; // this call must be first to avoid requiring c++ dependencies require("./common/verify-node-version").verifyNodeVersion(node, "NativeScript", "2.2.0"); require("./bootstrap"); import * as fiber from "fibers"; import Future...
Add a test for quick-info
/// <reference path='fourslash.ts' /> //// var name1 = undefined, id1 = undefined; //// var /*obj1*/obj1 = {/*name1*/name1, /*id1*/id1}; //// var name2 = "Hello"; //// var id2 = 10000; //// var /*obj2*/obj2 = {/*name2*/name2, /*id2*/id2}; goTo.marker("obj1"); verify.quickInfoIs("(var) obj1: {\n name1: an...
Add commented-out input instruction test file
/* import { expect } from 'chai' import Up from '../../index' import { insideDocumentAndParagraph } from './Helpers' import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode' import { InputInstructionNode } from '../../SyntaxNodes/InputInstructionNode' describe('Text surrounded by curly brackets', () => { it...
Add scroll event mock generator
import { NativeSyntheticEvent, NativeScrollEvent, NativeScrollPoint, } from 'react-native'; export default ( contentOffset?: NativeScrollPoint, ): NativeSyntheticEvent<NativeScrollEvent> => ({ nativeEvent: { contentOffset: { x: 0, y: 50, ...contentOffset }, contentInset: { top: 0, right: 0, left: 0, ...
Add helper to quickly write tests for tests/data/... examples
import { readFileTree } from '../../files/deno.ts' import { FileTree } from '../../types/filetree.ts' import { validate } from '../../validators/bids.ts' import { ValidationResult } from '../../types/validation-result.ts' import { DatasetIssues } from '../../issues/datasetIssues.ts' export async function validatePath(...
Remove a commented out import.
//import * as fs from "fs"; import Utils from "./Utils"; import Job from "./Job"; import {existsSync, statSync} from "fs"; const executors: Dictionary<(i: Job, a: string[]) => void> = { cd: (job: Job, args: string[]): void => { let newDirectory: string; if (!args.length) { newDirectory...
import Utils from "./Utils"; import Job from "./Job"; import {existsSync, statSync} from "fs"; const executors: Dictionary<(i: Job, a: string[]) => void> = { cd: (job: Job, args: string[]): void => { let newDirectory: string; if (!args.length) { newDirectory = Utils.homeDirectory; ...
Update styled-jsx/css typings, add tests for methods css.global and css.resolve
import * as React from 'react'; import * as css from 'styled-jsx/css'; import flushToReact, { flushToHTML } from 'styled-jsx/server'; const styled = ( <div> <style jsx>{` color: rebeccapurple; `}</style> </div> ); const styledGlobal = ( <div> <style jsx global>{` ...
import * as React from 'react'; import * as css from 'styled-jsx/css'; import flushToReact, { flushToHTML } from 'styled-jsx/server'; const styled = ( <div> <style jsx>{` color: rebeccapurple; `}</style> </div> ); const styledGlobal = ( <div> <style jsx global>{` ...
Add EmptyState component for when no HITs are in the redux store
import * as React from 'react'; import { EmptyState } from '@shopify/polaris'; export interface Props { onAction: () => void; } const EmptyHitTable = ({ onAction }: Props) => { return ( <EmptyState heading="You haven't searched any HITs yet." action={{ content: 'Search HITs', onAct...
Add Search Resource Unit Test:
import { SearchResource } from './search.resource'; describe('Resource Search', () => { beforeEach(angular.mock.module('roam')); it('should be registered', inject((searchResource: SearchResource) => { expect(searchResource).not.toBeNull(); })); });
Add a notebook widget factory
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. 'use strict'; import { IKernelId } from 'jupyter-js-services'; import { IWidgetFactory, IDocumentContext } from 'jupyter-js-ui/lib/docmanager'; import { RenderMime } from 'jupyter-js-ui/lib/rendermime'; impo...
Add more object shape properties to AuditResult.
interface AuditResult { displayValue: string; debugString: string; comingSoon?: boolean; score: number; description: string; extendedInfo?: { value: string; formatter: string; }; } interface AggregationResultItem { overall: number; name: string; scored: boolean; subItems: Array<AuditResul...
interface AuditResult { displayValue: string; debugString: string; comingSoon?: boolean; score: number; description: string; name: string; category: string; helpText?: string; requiredArtifacts?: Array<string>; extendedInfo?: { value: string; formatter: string; }; } interface AggregationR...
Add test for support of custom decorator names.
import { getType, } from '../src'; function UserDecorator(target: any) { } function OtherDecorator(target: any) { } @UserDecorator export class MyClassA { a: string; } @OtherDecorator export class MyClassB { a: string; } describe('Custom Decorators', () => { // Note UserDecorator is configured in we...
Add failing code block test
/// <reference path="../../../typings/mocha/mocha.d.ts" /> /// <reference path="../../../typings/chai/chai.d.ts" /> import { expect } from 'chai' import * as Up from '../../index' import { SyntaxNode } from '../../SyntaxNodes/SyntaxNode' import { DocumentNode } from '../../SyntaxNodes/DocumentNode' import { PlainTextN...
Add a notebook widget factory
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. 'use strict'; import { IKernelId } from 'jupyter-js-services'; import { IWidgetFactory, IDocumentContext } from 'jupyter-js-ui/lib/docmanager'; import { RenderMime } from 'jupyter-js-ui/lib/rendermime'; impo...
Fix case on TwitchUptime filename
import MessageHandler from "../messageHandler"; import ExtendedInfo from "../extendedInfo"; import TwitchExtendedInfo from "../extendedInfos/twitchExtendedInfo"; import MessageFloodgate from "../messageFloodgate"; import fetch from "node-fetch"; import * as fs from "fs"; function readSettings(): Promise<string> { ret...
Add type interface for old data structures
/** * Represent the data structure of a game in v1.0.0 */ export interface IOldGameData { /** * Current round of the game */ currentRound: number /** * The index of maker of this round. Points to the players array. */ maker: number /** * Array of players in the game */ players: IOldPlaye...
Add implementation of Queue in TypeScript
interface Queue<T> { readonly length: number; enqueue(value: T): number; dequeue(): T | undefined; peek(): T | undefined; isEmpty(): boolean; [Symbol.iterator](): IterableIterator<T>; } class QueueImpl<T> implements Queue<T> { private _store: Array<T> = []; get length(): number { return this._store.length; ...
Test KapacitorRulesTable tr keys to be UUIDv4
import React from 'react' import {shallow} from 'enzyme' import KapacitorRulesTable from 'src/kapacitor/components/KapacitorRulesTable' import {source, kapacitorRules} from 'test/resources' const setup = () => { const props = { source, rules: kapacitorRules, onDelete: () => {}, onChangeRuleStatus: ...
import React from 'react' import {shallow} from 'enzyme' import {isUUIDv4} from 'src/utils/stringValidators' import KapacitorRulesTable from 'src/kapacitor/components/KapacitorRulesTable' import {source, kapacitorRules} from 'test/resources' const setup = () => { const props = { source, rules: kapacitorRu...
Add helper for MSA auth tokens.
import * as request from "request"; export interface Token { token_type: string; expires_in: number; ext_expires_in: number; access_token: string; } interface CachedToken extends Token { expires_on: number; } let cachedToken: CachedToken; export function getBotframeworkToken(): Promise<Token> { ...
Add test for whatwg normalizer
'use strict'; import * as assert from 'power-assert'; import * as url from 'url'; import * as whatwg from '../rules/whatwg'; // describe('whatwg', () => { it('should normalize protocol', () => { const httpURL = 'http://dom.spec.whatwg.org/'; const actual = whatwg.normalize(url.parse(httpURL)); ...
Support passing ws options to listen.
// Type definitions for koa-websocket 2.1 // Project: https://github.com/kudos/koa-websocket // Definitions by: My Self <https://github.com/me> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 import Koa = require('koa'); import * as ws from 'ws'; import * as http from 'htt...
// Type definitions for koa-websocket 5.0 // Project: https://github.com/kudos/koa-websocket // Definitions by: Maël Lavault <https://github.com/moimael> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 import Koa = require('koa'); import * as ws from 'ws'; import * as http...
Add test to verify does not overwrite existing implementation
import * as fs from "fs"; import { assert } from "chai"; describe("Reflect", () => { it("does not overwrite existing implementation", () => { const defineMetadata = Reflect.defineMetadata; const reflectPath = require.resolve("../Reflect.js"); const reflectContent = fs.readFileSync(...
Fix apply changes to work when response is null
var Range = require('atom').Range; import {Observable} from "rx"; export function applyChanges(editor: Atom.TextEditor, response: { Changes: OmniSharp.Models.LinePositionSpanTextChange[]; }); export function applyChanges(editor: Atom.TextEditor, response: { Buffer: string }); export function applyChanges(editor: Atom...
Add Context to setup query/ dir
/** * Copyright 2018 The Lovefield Project Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless...
Implement basic initial integration tests for 404 and 500
// NOTE Running these tests requires the crossroads-education/eta-web-test module to be installed. process.env.ETA_TESTING = "true"; process.env.ETA_AUTH_PROVIDER = "cre-web-test"; import tests from "../../server/api/tests"; before(function(done) { this.timeout(20000); // plenty of time to initialize the server ...
Add unit test cases for toLowercase decorator
import { ToLowercase } from './../../src/'; describe('ToLowercase decorator', () => { it('should throw an error when is applied over non string property', () => { class TestClassToLowercaseProperty { @ToLowercase() myProp: number; } let testClass = new TestClassToLowercasePrope...
Add tests for connect typings
/// <reference path="./connect.d.ts" /> import * as http from "http"; import * as connect from "connect"; const app = connect(); // log all requests app.use((req, res, next) => { console.log(req, res); next(); }); // Stop on errors app.use((err, req, res, next) => { if (err) { return res.end(`Er...
Add a shared stacks helper
import { EventType } from 'parser/core/Events'; /** * Returns the current stacks on a given event * @param event */ export function currentStacks(event: any) { switch (event.type) { case EventType.RemoveBuff || EventType.RemoveDebuff: return 0; case EventType.ApplyBuff || EventType.ApplyDebuff: ...
Add a filter which populates the auth header for avatar requests
import { EndpointToken } from '../lib/endpoint-token' import { OrderedWebRequest } from './ordered-webrequest' export function installAuthenticatedAvatarFilter( orderedWebRequest: OrderedWebRequest ) { let originTokens = new Map<string, string>() orderedWebRequest.onBeforeSendHeaders.addEventListener(async deta...
Refactor - split script into small modules
import { modifyManifest } from './modifyManifest'; export function postlinkAndroid() { try { modifyManifest(); } catch (e) { console.warn('Failed to automatically update android manifest. Please continue manually'); } }
Add unit tests for range decorator
import { Range } from './../../src/'; describe('Range decorator', () => { it('should throw an error when no annotations are provided', () => { expect(() => { class TestClassRangeValue { @Range() // This will throw a TypeScript error (obviously) myNumber: number...
Add test relating type predicates with and without this parameters
// @strict: true interface ListItem<TData> { prev: ListItem<TData> | null; next: ListItem<TData> | null; data: TData; } type IteratorFn<TData, TResult, TContext = List<TData>> = (this: TContext, item: TData, node: ListItem<TData>, list: List<TData>) => TResult; type FilterFn<TData, TResult extends TD...
Add pokemon types - Refactoring
import { Type } from './type.model'; import { ItemTemplate } from '@core/game_master/gameMaster'; import { Util } from '@util'; export class TypeMapper { public static Map(rawType: ItemTemplate, typeIds: Map<number, string>): Type { let type: Type = new Type(); type.id = rawType.templateId ...
import { Type } from './type.model'; import { ItemTemplate } from '@core/game_master/gameMaster'; import { Util } from '@util'; import APP_SETTINGS from '@settings/app'; export class TypeMapper { public static Map(rawType: ItemTemplate): Type { let type: Type = new Type(); type.id = rawType.templa...
Add page size selector e2e test
///<reference path="../node_modules/@types/jasmine/index.d.ts"/> import { browser, element, by } from '../node_modules/protractor/built'; describe('page size selector', () =>{ let dataRowsCollection, firstDataRow, lastDataRow, firstPageBtn, nextPageBtn, pageSizeSelector, ...
Test for dimensions service prepareTimeSteps
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting, } from '@angular/platform-browser-dynamic/testing'; import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core'; import {HsDimensionService} from './dimension.service'; import {HsMapService} from '../components/map/map.service'; import {HsMapServiceMock}...
Adjust size of section divider
import * as React from 'react'; import styled from 'styled-components'; import { Draggable, DragMode, Unregister } from 'core/interactions/handlers/draggable'; interface Props { onDrag: (deltaY: number) => void; } export class SectionDivider extends React.Component<Props, {}> { draggable = new Draggable({ mode: ...
import * as React from 'react'; import styled from 'styled-components'; import { Draggable, DragMode, Unregister } from 'core/interactions/handlers/draggable'; interface Props { onDrag: (deltaY: number) => void; } export class SectionDivider extends React.Component<Props, {}> { draggable = new Draggable({ mode: ...
Add cd historical directories suggestions.
import {executable, sequence, decorate, string, noisySuggestions, runtime, choice} from "../../shell/Parser"; import {expandHistoricalDirectory} from "../../Command"; import {description, styles, style} from "./Suggestions"; import * as _ from "lodash"; import {relativeDirectoryPath} from "./File"; import {pathIn} from...
import {executable, sequence, decorate, string, noisySuggestions, runtime, choice} from "../../shell/Parser"; import {expandHistoricalDirectory} from "../../Command"; import {description, styles, style, Suggestion} from "./Suggestions"; import * as _ from "lodash"; import {relativeDirectoryPath} from "./File"; import {...
Check if multiple apps can be loaded
describe('Hslayers application', () => { beforeEach(() => { cy.visit('/multi-apps'); }); it('should display multiple hslayers elements', () => { cy.get('hslayers').should('have.length', 2); }); });
Introduce input component specifically for IFQL function selection
import React, {SFC, ChangeEvent, KeyboardEvent} from 'react' type OnFilterChangeHandler = (e: ChangeEvent<HTMLInputElement>) => void type OnFilterKeyPress = (e: KeyboardEvent<HTMLInputElement>) => void interface Props { searchTerm: string onFilterChange: OnFilterChangeHandler onFilterKeyPress: OnFilterKeyPress ...
Add fourslash test for in scope completion
/// <reference path='fourslash.ts'/> ////function f() { //// namespace n { //// interface I { //// x: number //// } //// /*1*/ //// } //// /*2*/ ////} /////*3*/ goTo.marker('1'); verify.completionListContains("f", "function f(): void"); verify.completionListCont...
Add failing html escaping test
import { expect } from 'chai' import Up from '../../../index' import { PlainTextNode } from '../../../SyntaxNodes/PlainTextNode' describe('All instances of "<" and "&" inside a plain text node', () => { it('are replaced with "&lt;" and "&amp;", respectively', () => { const node = new PlainTextNode('4 & 5 < 10, ...