text stringlengths 10 953k |
|---|
import { expect } from 'chai'
import { as } from '../../../src/services/cast'
import { CastError } from '../../../src/services/cast/CastError'
describe('as.integer', () => {
it('returns the value passed', () => {
const result = as.integer(15)
expect(result).to.equal(15)
})
it('throws for values other t... |
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions... |
import {Component} from '@angular/core';
import {ArrayCollection} from "jigsaw/public_api";
@Component({
templateUrl: './demo.component.html',
styleUrls: ['./demo.component.css']
})
export class SliderMultiValueComponent {
rangeValue1 = new ArrayCollection([20, 50, 80]);
rangeValue2 = new ArrayCollecti... |
import { Operator } from '../Operator';
import { Subscriber } from '../Subscriber';
import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';
import { EmptyObservable } from '../observable/EmptyObservable';
import { Observable } from '../Observable';
import { TeardownLogic } from '../Subscription';
/*... |
import { ASYNC_RESET_INDICATOR, validate } from './constants';
import Constrain from './Constrain';
import FormControl from './FormControl';
import { IFormRuleItem } from './models/control-rules';
import {
AllowedEvents,
IConstrainsMap,
IFormControlsMap,
IFormidateOptions,
IFormRules,
IFormValuesMap,
IMap... |
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert, unitTest } from "./test_util.ts";
unitTest(function formatDiagnosticBasic() {
const fixture: Deno.Diagnostic[] = [
{
start: {
line: 0,
character: 0,
},
end: {
line: 0,
cha... |
import * as React from 'react';
import { DefaultButton } from 'office-ui-fabric-react/lib/Button';
import { FocusTrapZone } from 'office-ui-fabric-react/lib/FocusTrapZone';
import { Link } from 'office-ui-fabric-react/lib/Link';
import { TextField } from 'office-ui-fabric-react/lib/TextField';
import { Toggle, IToggle... |
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class TokenService {
constructor() { }
saveToken(token:string) {
localStorage.setItem('token', token);
}
getToken() {
const token = localStorage.getItem('token');
return token;
}
removeToken() {
lo... |
/*
* Copyright (c) 2021, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
// @ts-ignore
import { ComponentSet, MetadataMember } from '@salesforce/source-deploy-ret... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="sq" version="2.0">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About ZcoinDark</source>
<translation type="unfinished"/>
</message>
<message>
<location line... |
import { Map } from 'immutable';
interface SvgrComponent extends React.StatelessComponent<React.SVGAttributes<SVGElement>> {}
declare module '*.svg' {
const svgUrl: string;
const svgComponent: SvgrComponent;
export default svgUrl;
export { svgComponent as ReactComponent };
}
export interface ImmutableMap<T> ... |
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app1-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
} |
import * as React from "react";
import UserInfo from "./models/UserInfo";
export interface Context {
user?: UserInfo;
setUser?: (userInfo?: UserInfo) => void;
selectedKey?: string;
setSelectedKey?: (key?: string) => void;
}
const AppContext = React.createContext<Context>({});
export default AppContext; |
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.enableCors();
let port: string | number = process.env.PORT;
if (port == null || port == '') {
port = 3000;
}
await ... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import expect from '@kbn/expect';
import { USER } from '../../../../functional... |
import generateAuthActions from './actions'
import reduxTokenAuthReducer from './reducers'
import generateRequireSignInWrapper from './generate-require-signin-wrapper'
export {
generateAuthActions,
generateRequireSignInWrapper,
reduxTokenAuthReducer,
} |
const RE = /^(?:[-+]?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/;
export const isFloatString = (x: string) => x.length > 0 && RE.test(x); |
beforeEach(() => {
angular
.module('<%- componentName %>', ['<%- templateUrl %>'])
.component('<%- componentName %>', <%- componentName %>);
<%- modules === 'webpack' ? 'angular.mock.' : '' %>module('<%- componentName %>');
}); |
/*---------------------------------------------------------------------------------------------
* Copyright (c) 2019 Bentley Systems, Incorporated. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license terms.
*--------------------------------------------------------------... |
// import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home.component';
import { WidgetsModule } from '../widgets/widget.module';
import { CommonModule } from '@angular/common';
@NgM... |
import { readdirSync, readFileSync, statSync, writeFileSync } from "fs";
import path from "path";
import { readFileAsObj } from "./utils";
const labelInputFile = 'labeled_data';
const labelOutputFile = 'auto_generated.json';
const labelInputPath = path.join(path.resolve(), labelInputFile);
const supportedTypes = new... |
import { GluegunToolbox } from 'gluegun'
import { PLAYSTATION_DIRECT, TARGET, WALMART } from '../contants'
module.exports = {
name: 'scrape',
alias: ['s'],
description: 'Runs the webscraper',
run: async (toolbox: GluegunToolbox) => {
// retrieve the tools from the toolbox that we will need
const { scra... |
import { Institucion } from './../../@core/data/institucion';
import { Credencial, Persona } from './../../@core/data/users';
import { Component, OnInit } from '@angular/core';
import { LocalDataSource } from 'ng2-smart-table';
import { UsersService } from 'src/app/@core/services/users.service';
import { takeUntil } fr... |
// Type definitions for RxJS-Lite v2.2.28
// Project: http://rx.codeplex.com/
// Definitions by: gsino <http://www.codeplex.com/site/users/view/gsino>, Igor Oleinikov <https://github.com/Igorbek>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="rx-lite.d.ts"/>
///<reference path="rx.... |
/*
* Copyright 2019 ABSA Group Limited
*
* 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 required by applicable law or agr... |
import * as joi from "joi";
import * as _ from "lodash";
import * as socketIO from "socket.io";
import { container, InjectionToken, singleton } from "tsyringe";
import { LoggerService } from "../../service/logger";
import { decoratorUtils } from "../../util";
import { WebServer } from "../../WebServer";
import { AuthR... |
import * as React from 'react';
import { makeStyles, Theme } from '@material-ui/core/styles';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
const useStyles = makeStyles((theme: Theme) => ({
root: {
flexGrow: 1,
width: '100%',
backgroundColor: theme.palette.background... |
import Header from '@/components/globals/Header'
import { mount } from 'enzyme'
import React from 'react'
const wrapper = mount(<Header />)
test('Match the snapshot', () => {
expect(wrapper.html()).toMatchSnapshot()
}) |
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const path = require("path")
// import AutoImport from 'unplugin-auto-import/vite'
// import Components from 'unplugin-vue-components/vite'
// import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
export default {
hmr: true,
... |
/*
* 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... |
/**
* Returns an array that only contains unique values found in the source array.
*/
export default function unique(a: any[]): any[]; |
import { moduleMetadata, storiesOf } from '@storybook/angular';
import { EditorComponent } from '../tinymce-angular-component/src/editor/editor.component';
import { BindingComponent } from './binding/binding.component';
import { BlogComponent } from './blog/blog.component';
import { SafePipe } from './pipes/safe.pipe';... |
import IMailProvider from '@shared/container/providers/MailProvider/models/IMailProvider';
import ISendMailDTO from '@shared/container/providers/MailProvider/dtos/ISendMailDTO';
export default class FakeMailProvider implements IMailProvider {
private messages: ISendMailDTO[] = [];
public async sendMail(message: I... |
export { default as Login } from './login/login'
export { default as Router } from './router' |
import {minLength} from '@commitlint/ensure';
import {SyncRule} from '@commitlint/types';
export const bodyMinLength: SyncRule<number> = (
parsed,
_when = undefined,
value = 0
) => {
if (!parsed.body) {
return [true];
}
return [
minLength(parsed.body, value),
`body must not be shorter than ${value} charac... |
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-courses',
templateUrl: './courses.component.html',
styleUrls: ['./courses.component.scss']
})
export class CoursesComponent implements OnInit {
constructor() { }
private courses = [];
private currentRate = 6;
ngOnInit() {
... |
import { assert } from '@0x/assert';
import { Order, SignatureType, ZeroExTransaction } from '@0x/types';
import { BigNumber } from '@0x/utils';
import * as chai from 'chai';
import { JSONRPCErrorCallback, JSONRPCRequestPayload } from 'ethereum-types';
import * as ethUtil from 'ethereumjs-util';
import * as _ from 'lod... |
import { Typography, Box, Button, Grid } from '@mui/material';
import React, { useState } from 'react';
import { HashLink as Link } from 'react-router-hash-link';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import { purple } from '@mui/material/colors';
import Footer from '../components/organisms... |
import Autosuggest from "react-autosuggest"
import { useEffect } from "react"
import * as React from "react"
import {
MagnifyingGlassIcon,
Text,
DROP_SHADOW,
LabeledInput,
} from "@artsy/palette"
import { usePriceEstimateContext } from "./ConsignPriceEstimateContext"
import { useTracking } from "react-tracking"... |
// hand icon svg path
export const RAISE_HAND_ICON_SELECTOR = '[d="M21,7c0-1.38-1.12-2.5-2.5-2.5c-0.17,0-0.34,0.02-0.5,0.05V4c0-1.38-1.12-2.5-2.5-2.5c-0.23,0-0.46,0.03-0.67,0.09 C14.46,0.66,13.56,0,12.5,0c-1.23,0-2.25,0.89-2.46,2.06C9.87,2.02,9.69,2,9.5,2C8.12,2,7,3.12,7,4.5v5.89 c-0.34-0.31-0.76-0.54-1.22-0.66L5.01,9.... |
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { ReactiveFormsModule } from '@angular/forms'
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'
import { FormsModule } from '@angular/forms'
import { AppComponent } from './app.component'... |
export const UPDATE_INSTALL = 'UPDATE_INSTALL';
export const UPDATE_AVAILABLE = 'UPDATE_AVAILABLE';
export interface UpdateInstallAction {
type: typeof UPDATE_INSTALL;
}
export interface UpdateAvailableAction {
type: typeof UPDATE_AVAILABLE;
version: string;
notes: string | null;
releaseUrl: string;
canIns... |
import { ProductCard as ProductCardHOC } from './ProductCard';
import { ProductTitle } from './ProductTitle';
import { ProductImage } from './ProductImage';
import { ProductButtons } from './ProductButtons';
import { ProductCardHOCProps } from '../interface/interface';
export { ProductTitle } from './ProductTitle';
ex... |
/*-
* ============LICENSE_START=======================================================
* SDC
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ===================================================================... |
import React, { useContext } from 'react';
import shortid from 'shortid';
import Avatar from '@components/Media/Avatar';
import Title from '@components/DataDisplay/Title';
import Text from '@components/DataDisplay/Text';
import Button from '@components/Form/Button';
import Facebook from '@components/Icon/FacebookOutlin... |
import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
export type AccordionPanelSlots = {
root: IntrinsicShorthandProps<'div'>;
};
export type AccordionPanelProps = ComponentProps<AccordionPanelSlots>;
export type AccordionPanelState = ComponentState<AccordionPan... |
import td from 'testdouble'
import childProcess from 'child_process'
import * as providerAzurepipelines from '../../src/ci_providers//provider_azurepipelines'
import { IServiceParams, UploaderInputs } from '../../src/types'
describe('Azure Pipelines CI Params', () => {
afterEach(() => {
td.reset()
})
descr... |
import { Provider } from '@project-serum/anchor';
import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token';
import { Keypair, Signer, Transaction } from '@solana/web3.js';
export function unwrapSol(
provider: Provider,
wrappedSolAccount: Keypair,
): { tx: Transaction; signers: Array<Signer> } {
const tx = new... |
import React from 'react'
import { Container } from './styles'
const News: React.FC = () => {
return (
<Container>
<span>Assuntos do momento no Brasil</span>
<strong>Programação ReactJs</strong>
</Container>
)
}
export default News |
import {Component, Input, OnInit, ViewChild} from "@angular/core";
import {NzFormatEmitEvent, NzTreeBaseService} from "ng-zorro-antd";
import {BiDataService} from "../../service/data.service";
import {Bi, Dimension, DimType, Reference} from "../../model/bi.model";
import {NzTreeNode} from "ng-zorro-antd/core/tree/nz-tr... |
// Form工具方法
import { frontEndTypeOptions, rearEndTypeOptions, algorithmTypeOptions, frontRearEndTypeOptions, toolTypeOptions } from './options';
/**
* 设置表单的type类型的option
* @param type 类别(前端:1;后端:2;算法:3;前后端:4;工具:5)
*/
const setType = (type:number, Form:any) =>{
switch(type){
case 1:
Form.inf... |
export const CLIENT = '$$_URQL'; |
/*
Copyright (C) 2017 Red Hat, Inc.
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 required by applicable law or ... |
import { Task } from './task.entity';
import { EntityRepository, Repository } from 'typeorm';
import { CreateTaskDto } from './dto/create-task.dto';
import { TaskStatus } from './task-status.enum';
import { GetTasksFilterDto } from './dto/get-tasks-filter.dto';
import { User } from '../auth/user.entity';
import { Inter... |
import type { Meta } from '@ember/-internals/meta';
import { meta as metaFor } from '@ember/-internals/meta';
import { inspect } from '@ember/-internals/utils';
import { assert } from '@ember/debug';
import EmberError from '@ember/error';
import type { UpdatableTag } from '@glimmer/validator';
import {
consumeTag,
... |
import { BadRequestException, Injectable } from '@nestjs/common';
import { PassportStrategy } from '@nestjs/passport';
import { Strategy } from 'passport-jwt';
import { AppHelper, UserContext } from '~/modules/core';
import { UserService } from '~/modules/user';
import { AuthHelper } from '../helpers';
import { AuthKey... |
/**
* @file OvalLoveTwo 椭圆爱心
* @author Auto Generated by IconPark
*/
/* tslint:disable: max-line-length */
/* eslint-disable max-len */
import React from 'react';
import {ISvgIconProps, IconWrapper} from '../runtime';
export default IconWrapper(
'oval-love-two',
true,
(props: ISvgIconProps) => (
... |
import {expect, use} from 'chai';
import chaiAsPromised from 'chai-as-promised'
import 'mocha';
import sinon, {SinonStubbedInstance} from 'sinon';
import {Database, SchemaManager} from '../src';
use(chaiAsPromised);
describe('SchemaManager', () => {
let databaseStub : SinonStubbedInstance<Database>;
let schem... |
import { DROPDOWN_MENU_Z_INDEX_ALIGNMENT } from '../../../../../../../../consts/dropdownMenuAlignment.enum';
import { Subcomponent, WorkshopComponent } from '../../../../../../../../interfaces/workshopComponent';
import { LinkedComponentsUtils } from '../../../shared/linkedComponents/linkedComponentsUtils';
import { JA... |
export enum SuccessCodes {
SUCCESSFUL_SYMPTOM_REGISTRY = 'SuccessfulSymptomRegistry',
SUCCESSFUL_USER_REGISTRY = 'SuccessfulUserRegistry',
} |
import { ProposeMiddlewareContext } from "@connext/types";
import { validateWithdrawApp } from ".";
export const proposeWithdrawMiddleware = async (cxt: ProposeMiddlewareContext) => {
const { params } = cxt;
return validateWithdrawApp(params);
}; |
import React from "react";
import { compact, xor } from "lodash";
import {
ValidationResponse,
ValidationTypes,
} from "constants/WidgetValidation";
import { TextSize, WidgetType } from "constants/WidgetConstants";
import { DerivedPropertiesMap } from "utils/WidgetFactory";
import BaseWidget, { WidgetProps, Widget... |
export const cardList = (() => {
const result: any[] = [];
for (let i = 0; i < 12; i++) {
result.push({
title: 'Vben Admin',
icon: 'logos:ant-design',
color: '#1890ff',
active: '100',
new: '1,799',
download: 'bx:bx-download',
});
}
return result;
})(); |
export type uint = number;
export type int = number;
export type byte = number;
export type bytes = Array<number>;
export type NodeCallback<T> = (Error, T) => void;
export const encoder = new TextEncoder();
export const decoder = new TextDecoder('utf-8'); |
import { Expirable } from './persistence.expirable';
import { Storable } from "./persistence.storable";
/**
* An interface for the cache config object used for caching and saves.
*
* @author Scott O'Bryan
* @since 1.0
*/
export type CacheConfig = Expirable & Storable; |
export declare type BlendModeStackEntry = {
enable: boolean;
srcRGB?: number;
dstRGB?: number;
srcAlpha?: number;
dstAlpha?: number;
};
//# sourceMappingURL=BlendModeStackEntry.d.ts.map |
import { Component } from '@angular/core';
import { PostViewModel, DateViewModel } from './blog.model';
@Component({
selector: 'blog-post-main-summary',
templateUrl: './blog.post.mainsummary.html',
styleUrls: ['./blog.post.mainsummary.css']
})
export class BlogPostMainSummaryComponent {
posts : PostVi... |
import { React, fs, path, colors } from '../deps.ts';
import {
pick,
unique,
sortByInsert,
importDefault,
logger,
walk,
getPagicConfigPath,
importPlugin,
importTheme,
serve,
getGitBranch,
} from './utils/mod.ts';
import type { PagePropsSidebar, PagicConfigSidebar } from './plugins/sidebar.tsx';
i... |
export declare function decompressXZ(buffer: Buffer): Promise<Buffer>;
export declare function unpack200(buffer: Buffer): Promise<Buffer>; |
import { Directive, ElementRef, forwardRef } from '@angular/core'
import { NG_VALUE_ACCESSOR } from '@angular/forms'
import { ValueAccessor } from './value-accessor'
@Directive({
/* tslint:disable-next-line:directive-selector */
selector: 'bal-radio-group, bal-checkbox-group, bal-select, bal-datepicker, bal-timei... |
import { OutputData } from "@editorjs/editorjs";
import { getAttributesDisplayData } from "@saleor/attributes/utils/data";
import {
createAttributeChangeHandler,
createAttributeFileChangeHandler,
createAttributeMultiChangeHandler,
createAttributeReferenceChangeHandler,
createAttributeValueReorderHandler,
cr... |
import { v4 } from 'uuid';
export type Asset = {
[key: string]: any
}
export const NewAsset = (type: string, meta: Asset) => {
return {
...meta, type,
id: v4(),
}
} |
import { Component} from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'quotes';
} |
import React from 'react'
interface IconProps {
size?: {
width: number
height: number
}
viewBox?: string
color?: string
}
export const LeftArrowIcon = ({
size = { width: 25, height: 25 },
viewBox = '0 0 16 16',
color = 'currentColor',
}: IconProps) => (
<svg
xmlns="http://www.w3.org/2000/s... |
import React, { useState } from 'react';
import { View } from 'react-native';
import { Checkbox } from 'anna-native';
const rowStyle = {
flexDirection: 'row',
justifyContent: 'space-between',
padding: 10,
backgroundColor: '#FFFFFF',
};
export default () => {
const [option, setOption] = useState(false);
r... |
import React from 'react';
import createSvgIcon from './helpers/createSvgIcon';
export default createSvgIcon(
<path d="M6 19h12v2H6z" />,
'Minimize',
); |
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-home-eight',
templateUrl: './home-eight.component.html',
styleUrls: ['./home-eight.component.scss']
})
export class HomeEightComponent implements OnInit {
constructor() { }
ngOnInit() {
}
} |
import { Component, OnDestroy, OnInit } from '@angular/core';
import { NgbTabChangeEvent } from '@ng-bootstrap/ng-bootstrap';
import { JhiHistoryService } from './history.service';
import { JhiRefreshService } from 'app/shared/refresh/refresh.service';
import { Subscription } from 'rxjs/Subscription';
@Component({
... |
import { CopyBackupToRegionCommandInput, CopyBackupToRegionCommandOutput } from "../commands/CopyBackupToRegionCommand";
import { CreateClusterCommandInput, CreateClusterCommandOutput } from "../commands/CreateClusterCommand";
import { CreateHsmCommandInput, CreateHsmCommandOutput } from "../commands/CreateHsmCommand";... |
/* eslint-disable @typescript-eslint/no-unsafe-call */
import React, { ReactNode } from 'react'
import { useState } from '@storybook/addons'
import { action } from '@storybook/addon-actions'
// import { Button } from 'components/atoms'
import { Form } from 'components/molecules'
import { GlobalStyles } from 'component... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { i18n } from '@kbn/i18n';
import { metrics } from './metrics';
import... |
import { Toolbar } from "@material-ui/core";
import Box from "@material-ui/core/Box/Box";
import Button from "@material-ui/core/Button/Button";
import Paper from "@material-ui/core/Paper/Paper";
import SaveIcon from "@material-ui/icons/Save";
import { useTranslation } from "@reactionable/core/lib/i18n/I18n";
import { u... |
import { getOsEnv } from 'helpers/path.helper';
export const env = {
apiBaseUrl: getOsEnv('REACT_APP_API_BASE_URL'),
clientBaseUrl: getOsEnv('REACT_APP_CLIENT_BASE_URL')
}; |
import { Type } from 'class-transformer';
import { IsNumber, IsString, IsOptional, IsArray, ValidateNested } from 'class-validator';
class ProductCharacteristicDto{
@IsString()
name: string;
@IsString()
value: string;
}
export class CreateProductDTO{
@IsString()
image: string;
@IsString()
title: string;
... |
export const bnsRpc = "BNS_RPC";
export interface StorageRpcData {
readonly networkName: string;
readonly rpcUrl: string;
}
export function getBnsRpc(): StorageRpcData | null {
const bnsRpcString = localStorage.getItem(bnsRpc);
if (bnsRpcString) {
return JSON.parse(bnsRpcString);
}
return null;
}
ex... |
/*
* 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 ... |
/*
* Copyright © 2020 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated... |
import { Meta, Story } from '@storybook/react';
import { TweetList } from '.';
import { getFakeTweets } from './getFakeTweets';
import { TweetListProps } from './TweetList';
import TweetListItem, { TweetListItemProps } from './TweetListItem';
export default {
title: 'Tweet List',
component: TweetList
} as Meta;
/... |
export var PyTestCommand =
`from discord.commands import slash_command
from discord.ext import commands
from config import config
class TestCommand(commands.Cog):
def __init__(self, bot):
self.bot = bot
@slash_command(guild_ids=[config.GUILD_ID])
async def ping(self, ctx):
await ... |
/**
* Filter to keep request sequence.
*/
import {getLogger} from 'pinusmod-logger';
import * as taskManager from '../../common/manager/taskManager';
import {RouteRecord} from '../../util/constants';
import {IHandlerFilter} from '../../interfaces/IHandlerFilter';
import {HandlerCallback} from '../../common/service/ha... |
import React, {
useEffect,
useRef,
useImperativeHandle,
forwardRef,
useState,
useCallback,
} from 'react';
import { TextInputProps } from 'react-native';
import { useField } from '@unform/core';
import { Container, TextInput, Icon } from './styles';
interface InputProps extends TextInputProps {
name: st... |
import { KeycloakInstance } from 'keycloak-js';
import { clearJwt, saveJwt } from 'store/slices/jwt/JwtSlice';
import { setKeycloakReady } from 'store/slices/keycloakReady/keycloakReadySlice';
import { store } from 'store/store';
import getKeycloakEventHandler from './getKeycloakEventHandler';
jest.mock('store/slices... |
import {DropDownMenu, FormField, FormSelect, HelpIcon, NotificationType, SlidingPanel} from 'argo-ui';
import * as PropTypes from 'prop-types';
import * as React from 'react';
import {Form, FormApi, Text, TextArea} from 'react-form';
import {RouteComponentProps} from 'react-router';
import {CheckboxField, ConnectionSt... |
import { Adapter } from "../adapters/adapter.ts";
import { Colors, joinPath } from "../../deps.ts";
import { Schema } from "./schema.ts";
import { createMigrationTimestamp } from "../utils/date.ts";
export interface Migration {
up(schema: Schema): Promise<void>;
down(schema: Schema): Promise<void>;
}
interface Mi... |
import { AnyObject } from './types';
import { Guard, PromiseAccumulator, withTimeout, withDomain, withRetries, sleep } from './utils';
import { TimeoutError } from './errors';
export interface ConnectOptions {
guard?: Guard;
retries?: number;
delay?: number;
timeout?: number;
}
interface FullConnectOptions ex... |
import { Context, ParserState } from '../common';
import { IdentifierReference } from '../ast/expressions/identifierreference';
import { DiagnosticCode } from '../diagnostic/diagnostic-code';
export declare function createIdentifier(state: ParserState, context: Context, code?: DiagnosticCode): IdentifierReference;
expo... |
/**
* Interface the all Storages
*/
export interface Storage {
clear(): void;
getItem(key: string): string;
setItem(key: string, data: string): void;
removeItem(key: string): void;
key(key: number): string;
}
/**
* BasicStorage
* This is a basicStorage to Storage
*
* Example:
* window.myTemporal = ... |
import * as React from "react"
export default {
nestedValue: {
title: "NestedValue",
description: <p>当输入本身返回嵌套数据时类型是object或者array。</p>,
},
resolver: {
title: "Resolver",
description: <p>此类型将支持用户编写自定义验证解析器。</p>,
},
submitHandler: {
title: "SubmitHandler",
description: (
<p>
... |
import 'reflect-metadata';
import Launcher from './modules/shared/infra/Launcher';
import { startApp } from '@eusebiu_gagea/mem';
startApp(Launcher); |
import { browser, logging } from 'protractor';
import { AppPage } from './app.po';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', async () => {
await page.navigateTo();
expect(await page.getTitleText()... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.