text stringlengths 10 953k |
|---|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { hmrBootstrap } from './hmr';
const bootstrap = () => platformBrowserDynamic().bootstrapModule(AppModule, {
preserveWhitespaces: true,
});
// @ts-ignore TS2304
if (module.hot) {
// @ts-i... |
// import BaseController from '../BaseController';
// import mustacheService from '../../services/MustacheService';
// import { ErrorNotFound } from '../../utils/errors';
// import uuidgen from '../../utils/uuidgen';
// import controllers from '../factory';
// export default class OAuthController extends BaseControlle... |
export { runBox, IRunBox, IError, IWarn, } from "./runBox";
export { asyncRunBox, IAsyncRunBox, } from "./asyncRunBox"; |
declare module goog {
function require(name: 'goog.ui.media.Photo'): typeof goog.ui.media.Photo;
}
declare module goog.ui.media {
/**
* Subclasses a goog.ui.media.MediaRenderer to provide a Photo specific media
* renderer. Provides a base class for any other renderer that wants to display
* pho... |
import request from 'supertest';
import { getConnection } from 'typeorm';
import { app } from '../app';
import createConnection from '../database';
describe('Surveys', () => {
beforeAll(async () => {
const connection = await createConnection();
await connection.runMigrations();
});
afterAll(async () =>... |
import * as React from 'react';
import { IconBaseProps } from 'react-icon-base';
export default class GoLinkExternal extends React.Component<IconBaseProps, any> { } |
import {Component, NgModule} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {CommonModule} from '@angular/common';
import {MatButtonModule} from '@angular/material/button';
import {MatIconModule} from '@angular/material/icon';
import {MatMenuModule} from '@angular/material/menu';
import {... |
import { Injectable } from '@angular/core';
import { PeriodsService } from './periods.service';
import { HeavenChart, HeavenChartData } from '../data/heaven-chart';
@Injectable()
export class HeavenChartService extends HeavenChartData {
private year = [
'2012',
'2013',
'2014',
'2015',
'2016',
... |
import styled from '@emotion/styled';
import { StyleProps } from '@tecsinapse/react-core';
import { Td } from '../../atoms/Table';
export const CheckboxCell = styled(Td)<Partial<StyleProps>>`
padding: ${({ theme }) => theme.spacing.mili};
& * {
user-select: none;
}
`; |
import * as box2d from "@box2d";
import * as testbed from "../Testbed.js";
export class PyramidTopple extends testbed.Test {
constructor() {
super();
const WIDTH = 4;
const HEIGHT = 30;
const add_domino = (world: box2d.b2World, pos: box2d.b2Vec2, flipped: boolean) => {
const mass = 1;
... |
import aws = require('aws-sdk');
export enum Mode {
ForReading,
ForWriting
}
export interface CredentialProviderSource {
name: string;
/**
* Whether the credential provider is even online
*
* Guaranteed to be called before any of the other functions are called.
*/
isAvailable(... |
import * as uuid from "uuid";
import {CreateTodoRequest} from "./requests/CreateTodoRequest";
import {TodosCloudManager} from "./todosCloudManager";
import {TodoItem} from "./models/TodoItem";
import {UpdateTodoRequest} from "./requests/UpdateTodoRequest";
import {createLogger} from "./utils/logger";
const todosCloudM... |
import Bone from '../../../parsers/m3/bone';
import { Uint32AnimationReference, Vector3AnimationReference, Vector4AnimationReference } from '../../../parsers/m3/animationreference';
/**
* An M3 bone.
*/
export default class M3Bone {
name: string;
parent: number;
location: Vector3AnimationReference;
rotation:... |
/* eslint-disable @typescript-eslint/no-use-before-define */
import React, { useEffect, ReactElement, useCallback } from 'react';
import debounce from 'lodash.debounce';
import { useSelector, useDispatch } from 'react-redux';
import { RootState } from '../store/reducers';
import { paperMain } from '../canvas';
// impor... |
import { injectable, inject } from 'tsyringe';
// import AppError from '@shared/errors/AppError';
import IAppointmentsRepository from '@modules/appointment/infra/repositories/IAppointmentsRepository';
import ICacheProvider from '@shared/container/providers/CacheProvider/models/ICacheProvider';
import { classToClass } ... |
import { Controller, Get, Param } from "@nestjs/common";
import { ProductTypesService } from "../service/productTypes.service";
@Controller("productTypes")
export class ProductTypesController{
constructor(
private readonly productTypeService: ProductTypesService
) {}
@Get("restaurant/:restaurantId... |
export * from './create' |
import React from 'react';
function RatingIcon() {
return (
<svg
version="1.1"
id="Capa_1"
xmlns="http://www.w3.org/2000/svg"
x="0px"
y="0px"
viewBox="0 0 488.049 488.049"
height="24px"
width="24px"
>
<g>
<path
d="M127.442,193.204H17.235... |
import { Component } from '@angular/core';
import { NavController, NavParams, ToastController } from 'ionic-angular';
import { ContactProvider, Contact } from '../../providers/contact/contact';
@Component({
selector: 'page-edit-contact',
templateUrl: 'edit-contatos.html',
})
export class EditContatosPage {
mode... |
export const components = {
basic: [
'/components/button',
'/components/icon',
'/components/elastic-box',
// '/components/flex',
],
dataDisplay: [
'/components/badge',
'/components/nav-bar',
'/components/card',
// '/components/image',
'/components/collapse',
'/components/ca... |
import axios from 'axios'
import cookie from 'js-cookie'
export async function useApi(url, method = 'GET', body = {}) {
let { data } = await axios(url, {
//@ts-ignore
method,
headers: {
authorization: cookie.get('session') ? `Bearer ${cookie.get('session')}` : undefined,
},
...(method !== 'GET' && { data... |
import { Observable, Subscriber } from 'rxjs/Rx'
export type HttpMethod = 'GET'|'POST'|'PUT'|'DELETE'|'PATCH'|'HEAD'|'OPTIONS'
export interface HttpRequest {
url: string
method: HttpMethod
search?: string|SearchParams
headers?: HttpHeaders|{ [key: string]: string }
body?: any
responseType?: XMLHttpRequest... |
import React from 'react';
const History = () => {
return (
<g>
{/* Green history circle */}
<circle r="200" fill="#BDFBD4" />
{/* White outer lines */}
<circle r="200" fill="none" stroke="#fff" strokeWidth="12" />
{/* Light blue outer line */}
... |
import { Host } from "./host.model";
const template = require("./host-list-embed.component.html");
const styles = require("./host-list-embed.component.scss");
export class HostListEmbedComponent extends HTMLElement {
constructor(
private _document: Document = document
) {
super();
}
... |
import { season, team } from "../core";
import { idb } from "../db";
import { g, getProcessedGames } from "../util";
import type { UpdateEvents, ViewInput, Game } from "../../common/types";
export const getUpcoming = async ({
tid,
limit = Infinity,
oneDay,
}: {
tid?: number;
limit?: number;
oneDay?: boolean;
}) ... |
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable, throwError } from 'rxjs';
import { catchError, retry } from 'rxjs/operators';
import { HttpErrorResponse, HttpResponse } from '@angular/common/http';
export interface Config {
heroesUrl: string;
te... |
import { CreateOutpostCommandInput, CreateOutpostCommandOutput } from "../commands/CreateOutpostCommand.ts";
import { DeleteOutpostCommandInput, DeleteOutpostCommandOutput } from "../commands/DeleteOutpostCommand.ts";
import { DeleteSiteCommandInput, DeleteSiteCommandOutput } from "../commands/DeleteSiteCommand.ts";
im... |
import { Component, ElementRef, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Intents } from 'src/app/entities/intents';
import { ChatBotService } from '../chat-bot.service';
@Component({
selector: 'app-health-bot',
templateUrl: './health-bot.component.html',
styleUrls: ['./health-bot.com... |
import { browser, by, element } from "protractor";
import { AppConfig } from "src/app/configs/app.config";
export class HeroesListPage {
static navigateTo(): any {
return browser.get(AppConfig.routes.heroes);
}
static getNumberHeroes(): any {
return element.all(by.css("#left mat-list-item")).count();
... |
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import classnames from 'classnames';
import { useState, useEffect } from '@wordpress/element';
import CheckboxControl from '@woocommerce/base-components/checkbox-control';
import { useValidationContext } from '@woocommerce/base-context';
import { us... |
import React, { useState, useEffect } from 'react'
import Fs from 'fs'
import Os from 'os'
import ContentTypes from '../../../ContentTypes'
import { PushpinUrl } from '../../../ShareLink'
import { DEVICE_URL_PATH } from '../../../constants'
import { ContentProps } from '../../Content'
import { useDocument } from '../..... |
interface JEnumeration<E> extends JObject {
java_util_Enumeration: "java.util.Enumeration";
/**
* 测试此枚举是否包含更多的元素
*/
hasMoreElements(): JBoolean;
/**
* 如果此枚举对象至少还有一个可提供的元素,则返回此枚举的下一个元素
*/
nextElement(): E;
} |
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { DescribeExportImageTasksRequest, DescribeExportImageTasksResult } from "../models/models_2";
import {
deserializeAws_ec2DescribeExportImageTasksCommand,
serializeAws_ec2DescribeExportImageTasksCommand,
} from "..... |
import { PropertyMetaInformation } from "../Api/DataTypes/PropertyMetaInformation";
export interface ICustomRenderer {
renderTableCell: (
target: any,
path: string[],
property: PropertyMetaInformation,
objectType: string
) => null | string | JSX.Element;
renderDetails: (
... |
interface Math {
/** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
readonly E: number;
/** The natural logarithm of 10. */
readonly LN10: number;
/** The natural logarithm of 2. */
readonly LN2: number;
/** The base-2 logarithm of e. */
readonly ... |
import { AuthGuard } from "@nestjs/passport";
export class JwtGuard extends AuthGuard('jwt') {
constructor() {
super();
}
} |
/// <reference types="express" />
import { Count, Filter, Where } from '@loopback/repository';
import { Response, Request } from '@loopback/rest';
import { Setting } from '../models';
import { SettingRepository } from '../repositories';
export declare class SettingController {
settingRepository: SettingRepository;
... |
/**
* License https://github.com/Remix-Design/RemixIcon/blob/master/License
*/
import { SVGIconDef } from './types';
const EarthOutlined: SVGIconDef = {
name: 'earth',
theme: 'outlined',
attrs: {
viewBox: '0 0 24 24',
},
children: '<path fill="none" d="M0 0h24v24H0z"/><path d="M6.235 6.453a8 8 0 0 0 8.... |
/*
* Copyright 2017-2018 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "lic... |
import { Component, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
import { AbstractFieldWriteComponent } from '../base-field/abstract-field-write.component';
@Component({
selector: 'ccd-write-fixed-list-field',
templateUrl: './write-fixed-list-field.html'
})
export class WriteFixedLi... |
/*
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* 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 requi... |
import { Module } from '@nestjs/common';
import { UploadResolver } from './upload.resolver';
import { UploadService } from './upload.service';
@Module({
imports: [],
providers: [UploadService, UploadResolver],
exports: []
})
export class GraphQLUploadModule {} |
import React from 'react';
import { Link } from 'react-router-dom';
import { FiChevronLeft } from 'react-icons/fi';
import logo from '../../assets/logo.svg';
import { Container, Logo } from './styles';
interface HeaderProps {
backToDashboard?: boolean;
}
const Header: React.FC<HeaderProps> = ({ backToDashboard })... |
import type { CombineArgsAndOptions } from './helpers'
interface GetAllArgs<Collection extends string = string> {
from: Collection
}
export type GetAllFnArgs<
O = undefined,
Collection extends string = string,
> = CombineArgsAndOptions<GetAllArgs<Collection>, O>
export type GetAllFn<O = undefined, Collection e... |
import { compose, prop, reject, sortBy, toLower } from 'ramda'
import { Category } from '../../typings'
const formatCategoryList = compose(
sortBy(compose(toLower, prop('name'))) as (
categories: Category[],
) => Category[],
reject(prop('archived')),
) as (categories: Category[]) => Category[]
export defau... |
/**
* @file IconArrowRight 箭头右
* @author Auto Generated by IconPark
*/
/* tslint:disable: max-line-length */
/* eslint-disable max-len */
import {ISvgIconProps, IconWrapper} from '../runtime';
export default IconWrapper('IconArrow-right', (props: ISvgIconProps) => (
'<?xml version="1.0" encoding="UTF-8"?>'
... |
import ResponseAction from '@/components/ResponseAction.vue'
import {beforeEach, describe, expect, test} from '@jest/globals'
import {mount, Wrapper} from '@vue/test-utils'
import Vue from 'vue'
import {ResponseActionType} from '@/types'
describe('ResponseAction.vue', () => {
let action: ResponseActionType
let wra... |
export declare const author = "anhnt";
export declare const version = "0.1.0";
export declare function strategy(space: any, network: any, provider: any, addresses: any, options: any, snapshot: any): Promise<{
[x: string]: any;
[x: number]: any;
}>; |
import { Getters } from '@augurproject/sdk';
import classNames from 'classnames';
import React, { useState, useEffect, Component } from 'react';
import { useHistory } from 'react-router';
import { SingleDatePicker } from 'react-dates';
import ChevronFlip from 'modules/common/chevron-flip';
import {
CATEGORY_PARAM_NAM... |
import {NgModule} from '@angular/core';
import {IonicApp, IonicModule} from 'ionic-angular';
import {AppComponent} from './app.component';
// diretives and providers
import {Loader} from '../providers/loader';
import {Nl2br} from '../pipes/nl2br';
import {SortPipe} from '../pipes/SortByJsonObjects';
import {MomentModu... |
import {Component, Inject, OnInit} from '@angular/core';
import {MAT_DIALOG_DATA} from '@angular/material';
import {Todo} from './todo';
import {FormControl, Validators, FormGroup, FormBuilder} from "@angular/forms";
import {NameValidator} from "./name.validator";
@Component({
selector: 'add-todo.component',
templ... |
export enum AbiType {
Function = 'function',
Constructor = 'constructor',
Event = 'event',
Fallback = 'fallback',
}
export interface SolcErrors {
[key: string]: boolean;
}
export interface ContractSourceData {
[contractName: string]: ContractSpecificSourceData;
}
export interface BinaryPaths ... |
import * as Aws from 'aws-sdk';
import { on, AwsServiceMockBuilder } from '@jurijzahn8019/aws-promise-jest-mock';
import { Action, BaseModel, BaseResource, BaseResourceHandlerRequest, exceptions, handlerEvent, OperationStatus, SessionProxy } from 'cfn-rpdk';
import { commonAws } from '../src/common-decorator';
jest.mo... |
export * from './colors';
export * from './shades';
export * from './consts';
export * from './interfaces';
export * from './cssColor';
export * from './rgb2hex';
export * from './clamp';
export * from './hsl2rgb';
export * from './hsl2hsv';
export * from './hsv2rgb';
export * from './hsv2hex';
export * from './rgb2hsv... |
/**
* Organizations API
* The Organizations API allows you to consolidate multiple OCI tenancies into an organization, and centrally manage your tenancies and its resources.
* OpenAPI spec version: 20200801
*
*
* NOTE: This class is auto generated by OracleSDKGenerator.
* Do not edit the class manually.
*
* Co... |
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Welcome... |
import React from 'react'
import { useSelector } from 'react-redux'
import { NavLink, useLocation } from 'react-router-dom'
import { generateString } from '../utils'
import { RootState } from '../../store/store';
interface SideBarProps {
routes: RouteSideBar[],
color?: string,
activeColor?: string,
isOpen: bo... |
import { prop } from '@typegoose/typegoose';
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
import { IEvent, Joined } from '../domain/events';
export class Battle extends TimeStamps {
@prop({
type: [String],
default: [],
set: (event: IEvent[]) => JSON.stringify(event), // store as ... |
import { css, customElement, html, LitElement, property, unsafeCSS, query } from 'lit-element';
import { classMap } from 'lit-html/directives/class-map';
const componentCSS = require('./app.component.scss');
/**
* Modern chip
* @event tagsChanged - Dispatched when tags changed and returns array of tags
* @event su... |
import { useCallback, useEffect, useState } from "react";
export const Speaker = () => {
const [volumeHole, setVolumeHole] = useState<string[]>([]);
// 60個の空文字の配列を作る
const createVolumeHole = useCallback(() => {
for (let index = 0; index < 60; index++) {
setVolumeHole((volumeHole) => [...volumeHole, ""... |
function parsePlatform(platform: string): string {
switch (platform) {
case 'commodore-amiga':
return 'commodore'
case 'ios':
case 'mac':
return 'apple'
default:
return platform
}
}
export { parsePlatform } |
import { makeStyles } from '@material-ui/core/styles';
// #region Local imports
import mikePalette from './mikePallete';
// #endregion
const Styles = makeStyles((theme) => ({
root: {
marginLeft: '2em',
[theme.breakpoints.down('xs')]: {
marginLeft: 0,
},
},
mainContainer: {
display: 'flex',... |
import { FastifyInstance } from "fastify";
import AppError from "src/common/AppError";
/**
* fastify hook配置,详情 https://www.fastify.cn/docs/latest/Hooks/
* @param fastify
*/
export default async function hooks (fastify: FastifyInstance) {
// 异常处理
fastify.setErrorHandler(function (error, request, reply) {
rep... |
import { RendererMock } from './RendererMock'
import {ResourceService} from './service/ResourceService'
import { MessagePipeline } from './MessageTransfer'
import { ExtensionManager } from './ExtensionManager'
import { ResourceObserver } from './service/ResourceObserver'
import { registSingletonObject } from './Singlet... |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh">
<context>
<name>ABIFunctionField</name>
<message>
<source>Function</source>
<translation type="unfinished">函数</translation>
</message>
</context>
<context>
<name>ABIParam</name>
<message>
<s... |
import { ChevronDownIcon } from '@chakra-ui/icons'
import { Box } from '@chakra-ui/layout'
import {
Flex,
Menu,
MenuButton,
MenuList,
MenuItem,
Button,
} from '@chakra-ui/react'
import React, { useState } from 'react'
import { MdPhotoCamera } from 'react-icons/md/index'
import { BsMusicNoteBeamed, BsFillCam... |
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-categories',
templateUrl: './categories.component.html',
styleUrls: ['./categories.component.scss']
})
export class CategoriesComponent implements OnInit {
constructor(
private _categoryService:
) { }
ngOnInit(): void {
... |
import _svg2ttf from 'svg2ttf';
import { FontAssetType } from '../../../types/misc';
import { FontGeneratorOptions } from '../../../types/generator';
import ttfGen from '../ttf';
const svg2ttf = (_svg2ttf as unknown) as jest.Mock<typeof _svg2ttf>;
jest.mock('svg2ttf', () =>
jest.fn(content => ({ buffer: `::ttf(${co... |
import { TestBed } from '@angular/core/testing';
import { ProductData } from '@spartacus/cart/base/root';
import { ImportProductsFromCsvService } from './import-products-from-csv.service';
const mockFileData: string[][] = [
['693923', '1', 'mockProduct1', '$4.00'],
['232133', '2', 'mockProduct2', '$5.00'],
];
con... |
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import {
C_MED_GRAY,
C_NEAR_WHITE,
DIRECTION_COLUMN,
DIRECTION_ROW,
Flex,
FONT_BODY_1_DARK,
FONT_SIZE_CAPTION,
FONT_WEIGHT_SEMIBOLD,
JUSTIFY_CENTER,
SPACING_3,
SPACING_4,
SPACING_1,
Text,
TEXT_TRANSFORM_UPPERCASE,
... |
import * as __aws_sdk_middleware_stack from "@aws-sdk/middleware-stack";
import * as __aws_sdk_types from "@aws-sdk/types";
import { ListInvitations } from "../model/operations/ListInvitations";
import { InputTypesUnion } from "../types/InputTypesUnion";
import { OutputTypesUnion } from "../types/OutputTypesUnion";
imp... |
export * from "./actions"
export * from "./api"
export * from "./createState" |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import * as React from "react";
import { ComponentType } from "react";
/**
* Wrap component with hook function with will be called in HOC component render
*/
function hoc<SP, HP>(hook: (props: SP) => HP, Source: ComponentType<HP & SP>) {
const Result: {
Original: unknown;
hook: unknown;
} = (props: SP) =... |
export function encode(str: string) {
const encoded: string = Buffer.from(str).toString("base64");
return encoded;
} |
import { AxiosRequestConfig, HttpService } from 'jovo-core';
import { BASE_PATH, BASE_URL, IdentityData } from '..';
export abstract class Message {
protected constructor(readonly recipient: IdentityData) {}
send(pageAccessToken: string): Promise<any> {
return HttpService.request(this.getConfig(pageAccessToke... |
export type Predicate<T> = (value: T) => boolean; |
import React from 'react';
export const WarningIcon = (props: React.SVGProps<SVGSVGElement>) => (
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M12 9V13.5"
stroke="white"
strokeWidth="1.125"
s... |
/**
* Combines a set of `FiberId`s into a single `FiberId`.
*
* @tsplus static ets/FiberId/Ops combineAll
*/
export function combineAll(fiberIds: HashSet<FiberId>): FiberId {
return fiberIds.reduce(FiberId.none, (a, b) => a + b)
} |
import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";
import {sector_evento} from "./sector_evento";
@Entity("evento",{schema:"redcobrosjp" } )
export class evento extends BaseEntity {
@Column("bigint",... |
/* eslint-disable @typescript-eslint/no-explicit-any */
import { assert } from 'chai'
import { tables } from '@architect/sandbox'
import { subscribe } from './subscribe'
import { mockServerContext } from '../test/mockServer'
import { connection_init } from './connection_init'
import { collect } from 'streaming-iterable... |
import { IDisposable } from "../../core/types";
import { ClearState } from "./ClearState";
import { RenderingContext } from "./RenderingContext";
export class Renderbuffer implements IDisposable {
readonly id: number;
disposed = false;
glRenderbuffer: WebGLRenderbuffer;
#clearState: ClearState = new ClearState... |
import { Component, ViewEncapsulation } from '@angular/core';
import { MaterialIconsRegistry, } from '@triangular/material-icons';
import {
materialIconIcNature24Px,
materialIconIcNature48Px,
materialIconIcNaturePeople24Px,
materialIconIcNaturePeople48Px,
materialIconIcNavigateBefore24Px,
materialIconIcNav... |
import _ from 'lodash';
import { EntityTrait, EntityTraits } from '../../../utils/entities';
export class Selection {
items: SelectedItem[];
constructor(items?: SelectedItem[] | SelectedItem | undefined) {
if (!items) {
items = [];
} else if (!Array.isArray(items)) {
it... |
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { format } from 'prettier';
import { plugin } from './../../../src/index';
describe('Issues', () => {
test('should treat attribute interpolation using quotes properly', () => {
const expected: string = readFileSync(resolve(__dirname, 'formatt... |
/**
* title: 自定义下拉菜单的展示
* desc: Customize the popup content by `dropdownRender`
*/
import { Cascader, Divider, Space } from '@sensoro-design/react';
const options = [
{
value: 'beijing',
label: 'Beijing',
children: [
{
value: 'Beijing',
label: 'Beijing',
children: [
... |
const maxExpand = 10
class Aliases {
mappings: Map<string, string>
constructor(mappings: {[key: string]: string}) {
this.mappings = new Map(Object.entries(mappings).map(([from, to]) => [from.toLowerCase(), to]))
}
_expand(messageTextBody: string): string {
const spaceIndex = messageTextBody.indexOf('... |
/*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0, (the "License"); you ma... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
export * from './contact';
export * from './reCAPTCHA'; |
module ymaps {
export module util {
export class Storage {
add(key:string, object:any):Storage;
// todo check for Object type. Maybe wrong?
get(key:string|Object):any;
remove(key:string):Storage;
}
}
} |
import { cleanImageUrl } from 'components/Logo';
describe('Logo component', () => {
it('Reformats logo url correctly for css content', () => {
const url =
'https://s.theguardian.com/sponsor/26/Sep/2019/id (stacked) (white version).png';
const expectedCleanedUrl =
'https://s.theguardian.com/sponsor/26/Sep/20... |
import React, { FC, useState } from 'react';
import { useDeleteUserMutation, GetAllUsersQuery, GetAllUsersDocument,
useGetAllUsersQuery, useResetPasswordMutation } from '../../../../generated/graphql'
import LoadingComponent from '../../../../components/Loading/loading.component';
import useStyles from '../table.styl... |
/**
* @file Press 点击
* @author Auto Generated by IconPark
*/
/* tslint:disable: max-line-length */
/* eslint-disable max-len */
import {ISvgIconProps, IconWrapper} from '../runtime';
export default IconWrapper(
'press',
true,
(props: ISvgIconProps) => (
<svg
width={props.size}
... |
import { Grid, Loader } from '@fluentui/react';
import * as React from 'react';
const LoaderExampleLabel: React.FC = () => (
<Grid columns={2} variables={{ gridGap: '20px' }}>
<Loader label="At start" labelPosition="start" />
<Loader label="At end" labelPosition="end" />
<Loader label="At above" labelPo... |
import { AbstractFactory } from '../abstract-factory';
import { Factory } from '../factory';
import { Random } from '../engine/random';
import { Assert } from '../../utils/assert';
import { MAX_PERCENTAGE, MIN_PERCENTAGE } from '../../constants/limits';
export class Selector<T = any, K = any> extends AbstractFactory<T... |
import * as R from 'ramda';
import React from 'react';
import {
ICellCoordinates,
Data,
Datum,
ICellFactoryProps,
IDropdown,
IDropdownValue,
IViewportOffset,
IColumn,
Presentation,
Columns
} from 'dash-table/components/Table/props';
import CellInput from 'dash-table/components/C... |
/*
* Copyright (c) 2021 Tobias Hegemann
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, pub... |
import IRestaurant from '../Model/IRestaurant';
const mockRestaurants = require('../Fixtures/mockRestaurant.json');
class RestaurantService {
public static getRestaurants(): Promise<IRestaurant[]> {
return new Promise((resolve) => {
resolve(mockRestaurants);
});
}
public stat... |
import { Peripheral } from 'raspi-peripheral';
export declare const OFF = 0;
export declare const ON = 1;
export declare class LED extends Peripheral {
constructor();
hasLed(): boolean;
read(): 0 | 1;
write(value: 0 | 1): void;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.