text stringlengths 10 953k |
|---|
import { IsString, IsNumber, IsOptional, IsNotEmpty } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class MusicDto {
@ApiProperty({ type: Number })
@IsOptional()
@IsNumber()
readonly id?: number;
@ApiProperty({ type: String })
@IsNotEmpty()
@IsString()
readonly title: s... |
import { Role } from 'src/shared/enums';
import { Column, Entity } from 'typeorm';
import { BaseEntity } from './base';
@Entity('User')
export class UserEntity extends BaseEntity {
@Column({ length: 25, unique: true })
userName:string;
@Column()
firstName:string;
@Column()
lastName:st... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="sr" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Magnet</source>
<translation>О Magnet-u</translation>
</message>
<message>
<location li... |
import * as _ from 'lodash';
import * as React from 'react';
import { Button } from '@patternfly/react-core';
import { CloseIcon } from '@patternfly/react-icons';
import { useTranslation } from 'react-i18next';
import { definitionFor } from '../../module/k8s';
import { ResourceSidebarSnippets, ResourceSidebarSamples }... |
import { defaultRegionInfoProvider } from "./endpoints";
export const ClientSharedValues = {
apiVersion: "2017-09-08",
disableHostPrefix: false,
regionInfoProvider: defaultRegionInfoProvider,
signingName: "serverlessrepo"
}; |
import { IconDefinition } from '../types';
declare const ClusterOutlined: IconDefinition;
export default ClusterOutlined; |
/*
* 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 React, { Fragment, FC, useContext } from 'react';
import { JobCreatorC... |
import { NodeHttpOptions as __HttpOptions__ } from "@aws-sdk/types";
import * as __aws_sdk_types from "@aws-sdk/types";
/**
* ListPartnerEventSourcesInput shape
*/
export interface ListPartnerEventSourcesInput {
/**
* <p>If you specify this, the results are limited to only those partner event sources that start... |
import { FC } from 'react';
import { EdgeProps, getBezierPath, getMarkerEnd } from 'react-flow-renderer';
const CustomEdge: FC<EdgeProps> = ({
id,
sourceX,
sourceY,
targetX,
targetY,
sourcePosition,
targetPosition,
data,
arrowHeadType,
markerEndId,
}) => {
const edgePath = getBezierPath({ sourceX... |
export * from './get-customer.query'
export * from './get-customer-by-id.query' |
import React from 'react';
import ReactDOM from 'react-dom';
import { Typography } from 'antd';
const { Text } = Typography;
const EllipsisMiddle = ({ suffixCount, children }) => {
const start = children.slice(0, children.length - suffixCount).trim();
const suffix = children.slice(-suffixCount).trim();
return ... |
import { PluginService } from "plugins";
import { PluginServiceIdentifier } from "plugins/types";
import { useSignMessageModal } from "./use-sign-message-modal";
export class MessagePluginService implements PluginService {
config() {
return {
id: PluginServiceIdentifier.Message,
accessor: "message",
};
}
... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*-------------------------------------------------------------------------... |
/**
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
* @format
*/
import * as React from 'react';
import {Button, Switch, Text, TextInput, View} from 'react-native';
import {Flyout, Picker, Popup, Placement} from 'react-native-windows';
interface IFlyoutExampleState {
isFlyoutVisible: bo... |
import Scrollspy from 'react-scrollspy';
import {styled, themeGet} from '@twilio-paste/styling-library';
export const TableOfContentsList = styled(Scrollspy)`
position: sticky;
top: 0;
right: 0;
margin: 0;
padding: 0;
list-style: none;
border-left-width: 1px;
border-left-style: solid;
border-left-col... |
import Compiler, { CompilerOptions } from './Compiler';
import { MatchResult } from './match';
import { State } from './state';
import { isWord } from './utils';
export interface GroupValue {
index: number;
name?: string;
match: string;
}
export interface GroupIndex {
index: number;
name?: string | undefine... |
import { shields } from '../data/shield.data'
import { createShieldViewModel } from './shield.functions'
import { isString } from './utils.functions'
describe('createShieldViewModel', () => {
it('should add collapse property', () => {
const expected = true
const result = 'collapse' in createShieldViewModel(s... |
import React from "react";
import clsx from "clsx";
import { makeStyles, createStyles, Chip, ChipProps } from "@material-ui/core";
export const VARIANTS = ["yes", "no", "maybe"];
const useStyles = makeStyles(
createStyles({
yes: {
backgroundColor: "#58bc8a",
color: "hsl(150, 100%, 11%)",
},
... |
<TS language="tr_TR" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Adresi veya etiketi düzenlemek için sağ tıklayın</translation>
</message>
<message>
<source>Create a new address</source>
... |
import { ScNet, ScTemplateSearchResult } from '@ostis/sc-core';
import { ServerKeynodes } from './ServerKeynodes';
import { ServerBase } from './ServerBase';
export class ServerUtils extends ServerBase {
constructor(client: ScNet, keynodes: ServerKeynodes) {
super(client, keynodes);
}
public async... |
import * as React from "react";
import { Direction, EmbeddedIconProps, MenuOffsetData, ReactAttr, ReactDivAttr, RenderIconProps } from "../../../typings/shared";
type ExcludedAttributes = "aria-expanded" | "aria-haspopup" | "aria-label" | "onBlur" | "onClick" | "onKeyDown" | "onKeyPress" | "role";
interface InheritedP... |
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { Operations } fr... |
import {Component} from "angular2/core";
import {RouteConfig,ROUTER_DIRECTIVES} from "angular2/router";
import {FirstRouterComponent} from "./firstRouterComponent";
import {SecondRouterComponent} from "./secondRouterComponent";
import {ThirdRouterComponent} from "./thirdRouterComponent";
@Component({
selector:"par... |
import { RGBColor } from '@antv/color-schema';
import { randomColor } from '@src/generators/random';
describe('Random Generator', () => {
test('should generate random colors', () => {
const { model, value } = randomColor() as RGBColor;
const { r, g, b } = value;
expect(model).toBe('rgb');
expect(Math... |
export * from './components/ExtendedPicker/index'; |
import * as cdk from '@aws-cdk/core';
import * as cfn_parse from '@aws-cdk/core/lib/cfn-parse';
/**
* Properties for defining a `AWS::IAM::AccessKey`.
*
* @external
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html
*/
export interface CfnAccessKeyProps {
/*... |
import React from "react";
import { Text } from "react-native";
import useDimensions, {
useScreenDimensions,
useWindowDimensions,
} from "../src";
import renderer from "react-test-renderer";
jest.useFakeTimers();
const ScreenDimensions: React.FC = () => {
const { height, width } = useScreenDimensions();
cons... |
import { Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { Model } from 'mongoose';
import * as mongoose from 'mongoose';
import { Doctor, DoctorDocument } from './schemas/doctor.schema';
import { GetAllDoctorDto } from './dtos/get-allDoctor.dto';
import { GetByIdDoctorDto } ... |
/*
* MIT License
*
* Copyright (c) 2021 Staatsbibliothek zu Berlin - Preußischer Kulturbesitz
*
* 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 l... |
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { SortOrder } from '../prisma/sort-order.enum';
@InputType()
export class ComponentParameterSumOrderByAggregateInput {
@Field(() => SortOrder, {nullable:true})
id?: keyof typeof SortOrder;
@Field(() => SortOrder,... |
import React from 'react'
import { shallow, configure } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import { openToast } from '../component/Toast/index'
configure({ adapter: new Adapter() })
test('1加1等于2', () => {
expect(1 + 1).toBe(2)
});
test('Jest-React-TypeScript 尝试运行', () => {
const rend... |
import { getSigners, setupWagmiClient } from '../../../test'
import { MockConnector } from '../../connectors/mock'
import { connect } from './connect'
import { getAccount } from './getAccount'
const connector = new MockConnector({
options: { signer: getSigners()[0] },
})
describe('getAccount', () => {
beforeEach(... |
import { BeaconRequestMapper } from "./BeaconRequestMapper";
describe("BeaconRequestMapper", () => {
it("maps an empty IBeacon partial to an empty request", () => {
const beaconRequestMapper = new BeaconRequestMapper();
const mappedBeaconRequest = beaconRequestMapper.map(
"9d7eb567-2212-4d71-8932-9553... |
import React, { createContext, useContext, PropsWithChildren, ChangeEvent } from 'react';
import cs from '../_util/classNames';
import { isArray, isObject } from '../_util/is';
import Radio from './radio';
import { ConfigContext } from '../ConfigProvider';
import useMergeValue from '../_util/hooks/useMergeValue';
impor... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
export const CommonSelectors = {
settingsGearButton: '.gear-button',
settingsDropdownMenu: '#settings-dropdown-menu',
previewFeaturesDropdownButton: '.preview-features-drop-down-button',
highContrastThemeSele... |
import React, { useEffect, useRef, useState } from "react";
import styled from "styled-components";
import useOutsideClick from "../../hooks/useOutsideClick";
const DropDownButton: React.FC<any> = ({
children,
DropDown,
triggerClose,
width,
dropdownWidth,
dropdownTop,
dropdownRight,
dropdownLeft,
}) =>... |
import * as React from 'react'
import { Image, TouchableHighlight, StyleSheet, Text, View } from 'react-native'
import { withNavigation } from 'react-navigation'
import Svg from './svg'
interface Props {
title: string,
backIcon?: boolean,
noIcon?: boolean,
morePadding?: boolean,
navigation?: any
}
class Hea... |
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { GroundForcesComponent } from './ground-forces/ground-forces.component';
const routes: Routes = [
{ path: 'forces/ground-forces', component: GroundForcesComponent }
];
@NgModule({
imports: [RouterModule.forC... |
import { CHAIN_ID } from 'src/config/chain.d'
import { addressBookFixEmptyNames } from '../actions'
import addressBookReducer, { batchLoadEntries } from '../reducer'
describe('Test AddressBook BatchLoadEntries Reducer', () => {
describe('batchLoadEntries', () => {
it('returns an addressbook array', () => {
... |
import React from "react"
import Icon from "./Icon"
// @ts-ignore
import styled, { StyledComponentClass } from "styled-components"
import colors from "../Assets/Colors"
import { garamond } from "../Assets/Fonts"
export interface BorderedPullDownProps
extends React.HTMLProps<BorderedPulldown> {
options: any
def... |
import { Customer } from "src/DB/models/Customer";
import { EntityRepository, Repository } from "typeorm";
import { BotContext } from "../interfaces/BotContext";
@EntityRepository(Customer)
export class CustomerRepository extends Repository<Customer> {
async getUser(ctx: BotContext, relations?: string[]) {
... |
<TS language="es_UY" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Clic derecho para editar dirección o etiqueta</translation>
</message>
<message>
<source>Create a new address</source>
<... |
import { ActiveDescendantKeyManager } from "@angular/cdk/a11y";
import { Component, OnInit, DoCheck } from "@angular/core";
import { NgForm } from "@angular/forms";
import { Router, ActivatedRoute } from "@angular/router";
import { DataserviceService } from "../../../dataservice.service";
import { NbToastrService } fro... |
// Copyright 2020 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
import { useState } from "react";
import { Button, Col, Container, Form, Row } from "react-bootstrap";
import { login, register } from "../requests";
import { User } from "../types";
interface SubmitEvent extends Event {
readonly submitter: HTMLElement;
}
interface LoginFormProps {
setUser: (user: User) => vo... |
import { Filter } from '../types/filter.type';
import { normalizeLength } from '../utils/filter.utils';
export const dropShadow: Filter = (context, offsetX: string, offsetY: string, blurOrColor?: string, color?: string) => {
// prepare a new temp canvas
const shadowContext = document.createElement('canvas').getCon... |
import {NgModule,Component,ElementRef,AfterViewInit,OnDestroy,Input,Output,Renderer2} from '@angular/core';
import {CommonModule} from '@angular/common';
import {DomHandler} from '../dom/domhandler';
import {MenuItem} from '../common/menuitem';
import {RouterModule} from '@angular/router';
@Component({
selector: '... |
/// <reference path="../typings/index.d.ts" />
//---------------------------------------------------------------------
// <copyright file="main.ts">
// This code is licensed under the MIT License.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMIT... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
namespace g {
/**
* `Scene#setTimeout` や `Scene#setInterval` の実行単位を表す。
* ゲーム開発者が本クラスのインスタンスを直接生成することはなく、
* 本クラスの機能を直接利用することはない。
*/
export class TimerIdentifier implements Destroyable {
/**
* @private
*/
_timer: Timer;
/**
* @private
*/
_handler: () => void;
/**
* @private
*/
_h... |
import { Component, OnInit, Input, ViewChild, ElementRef } from '@angular/core';
@Component({
selector: 'pinterest-pin',
templateUrl: './pinterest-pin.component.html',
styleUrls: ['./pinterest-pin.component.css']
})
export class PinterestPinComponent implements OnInit {
@Input() size: string;
@Input() descr... |
import * as React from 'react';
import { makeCopyOfPolicy } from '../../../types/adapters/PolicyAdapter';
import { assertNever } from '@redhat-cloud-services/insights-common-typescript';
import { NewPolicy, Policy } from '../../../types/Policy/Policy';
import { useCallback } from 'react';
type PolicyDetailWizardState ... |
import { AddressInput } from "@commercelayer/react-components"
import { useTranslation } from "react-i18next"
import styled from "styled-components"
import { FlexContainer } from "components/ui/FlexContainer"
import { CheckCss } from "components/ui/form/CheckBox"
import { Label } from "components/ui/Label"
interface ... |
import React, { forwardRef } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'
import { IComponentBaseProps } from '../types'
import { bgColors, brandColors, componentStatuses } from '../constants'
export const windowMockupColors = [
...bgColors,
...brandColors,
...componentStatuses,... |
/**
* Human Cell Atlas
* https://www.humancellatlas.org/
*
* State backing get data layout component.
*/
// App dependencies
import { Facet } from "../../facet/facet.model";
import { FileSummary } from "../../file-summary/file-summary.model";
import { SearchTerm } from "../../search/search-term.model";
export in... |
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 { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: '',
redirectTo: 'login',
pathMatch: 'full'
},
{
path: 'registrazione',
loadChildren: () => import('./registrazione/registrazione.module').then(... |
import React, { ChangeEvent, useCallback, useRef } from 'react';
import { useHistory, Link } from 'react-router-dom';
import { FormHandles } from '@unform/core';
import { Form } from '@unform/web';
import * as Yup from 'yup';
import { FiMail, FiLock, FiUser, FiCamera, FiArrowLeft } from 'react-icons/fi';
import api fr... |
// import { RequestHandler } from 'express';
// import requestMiddleware from '../../middleware/request-middleware';
// import Book from '../../models/Book';
// const all: RequestHandler = async (req, res) => {
// const books = await Book.find();
// res.send({ books });
// };
// export default requestMiddleware(a... |
beforeEach((): void => {
jest.resetModules();
});
describe('@modus/gimbal-core/event/index', (): void => {
describe('on', (): void => {
it('should add a callback', async (): Promise<void> => {
const { default: Emitter } = await import('./index');
const fn = jest.fn().mockResolvedValue('returned');
... |
import {
CanActivate,
ExecutionContext,
Injectable,
InternalServerErrorException,
UnauthorizedException,
} from '@nestjs/common';
import { ExpertAuthService } from './expert.auth.service';
import { Expert } from './expert.entity';
@Injectable()
export class ExpertGuard implements CanActivate {
constructor(... |
// Packages imports
import { interpolate, useAnimatedStyle } from "react-native-reanimated";
// Local Imports
import Layout from "../constants/Layout";
import { StoryCardAnimatedProps } from "../store/stories/types";
// Constants
const screenWidth = Layout.window.width;
// Custom hook to get Animated Styles
export d... |
import React, { FC, ReactElement, InputHTMLAttributes, ChangeEvent } from 'react'
import classNames from 'classnames'
import { IconProp } from '@fortawesome/fontawesome-svg-core'
import Icon from '../Icon'
type InputSize = 'lg' | 'sm'
export interface InputProps extends Omit<InputHTMLAttributes<HTMLElement>, 'size' > ... |
/**
* @file binary tree node
* @author arlenyang
*/
import BinaryTreeNodeSuperClass from "./BinaryTreeNodeSuperclass";
export default class BinaryTreeNode extends BinaryTreeNodeSuperClass {
constructor(data: any);
} |
import React from "react"
import { AuctionsApp_viewer } from "v2/__generated__/AuctionsApp_viewer.graphql"
import { AuctionsMeta } from "./Components/AuctionsMeta"
import { MyBidsFragmentContainer } from "./Components/MyBids/MyBids"
import {
Column,
GridColumns,
Join,
Spacer,
Text,
Tabs,
Tab,
} from "@art... |
import styled from 'styled-components'
export const Container = styled.button`
display: flex;
justify-content: center;
align-items: center;
height: 100%;
padding: 0 15px;
border-radius: 10px 10px 0 0;
background-color: ${({ theme }) => theme.colors.primary};
color: ${({ theme }) => theme.colors.text};
... |
import { inject, ref, toRef } from 'vue'
import { configProviderContextKey } from '@element-plus/tokens'
import { hasOwn, isObject } from '@element-plus/utils/util'
import type { Ref } from 'vue'
import type { ConfigProviderContext } from '@element-plus/tokens'
export function useGlobalConfig<K extends keyof ConfigPro... |
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import vuetify from "./plugins/vuetify";
import { apolloProvider } from "./plugins/vue-apollo";
import i18n from "./i18n/i18n";
import { loadLanguageAsync } from "@/i18n/utils/load-language-async";
import Vue... |
import { AttributeIds } from "node-opcua-data-model";
import { resolveNodeId } from "node-opcua-nodeid";
import { constructEventFilter } from "node-opcua-service-filter";
import { ReadValueIdOptions, TimestampsToReturn } from "node-opcua-service-read";
import { CreateSubscriptionRequestOptions, MonitoringParametersOpti... |
import test from 'tape';
import { killStuckProcess } from './utils';
import {
mintNFT,
createStore,
createPrerequisites,
initSellingResource,
createMarket,
} from './actions';
killStuckProcess();
test('create-market: success', async (t) => {
const { payer, connection, transactionHandler } = await createP... |
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
//
// Copyright 2016-2018 Pascal ECHEMANN.
//
// 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.apac... |
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import * as coreClient from "@azure/core-client";
import * as coreAuth from "@azure/core-... |
import { FormEvent, useState } from "react";
import { Form, FormControl, Modal, Button } from "react-bootstrap";
import { api } from "../../services/api";
type ModalProps = {
show?: boolean
onHide?: () => void
}
export function ModalTags(props: ModalProps) {
const [tag, setTag] = useState<string>("");
... |
import { gql } from '@apollo/client';
import { fields } from './models/Prescription';
export const PRESCRIPTIONS_QUERY = gql`
query PrescriptionsInformation ($sqon: JSON, $first: Int, $offset: Int) {
Prescriptions {
hits(filters: $sqon, first: $first, offset: $offset) {
edges {
node {
... |
import { userJoin, userLeft } from '../Utils/randomSelector'
import { modActionEmbed } from '../Utils/embeds'
import { Client, Guild, GuildMember, User } from 'discord.js'
exports.handleJoin = (member: GuildMember) => {
console.log(member)
if (member.guild.channels.exists('name', 'general')) return member.guild.ch... |
import { ExampleInfo, ApiTable, ApiProps, ApiEvent } from "../example.typing";
import { format } from "../../../utils";
const base: ExampleInfo = {
title: "基础使用",
desc: format(`
使用v-model绑定checked可以设置复选框是否选中。
`)
};
const disabled: ExampleInfo = {
title: "禁用",
desc: format(`
通过设置dis... |
/**
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
* SPDX-License-Identifier: BSD-3-Clause
*/
import '@testing-library/jest-dom/extend-expect';
import ClayTabs from '..';
import {cleanup, fireEvent, render} from '@testing-library/react';
import React from 'react';
const ClayTabsWithItems = ()... |
import clsx from 'clsx';
import React from 'react';
export interface TextProps extends React.ComponentProps<'p'> {
centered?: boolean;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
italic?: boolean;
weight?:
| 'thin'
| 'extralight'
| 'light'
| 'normal'
| 'medium'
| 'semibold'
| '... |
import React, { CSSProperties } from 'react';
import { Row, Col, Image } from 'antd';
import { ButtonComponent } from '../Button';
interface ComponentProps {
style?: CSSProperties;
title?: string;
src?: string;
label?: string;
onClick?: () => void;
}
export const HeroMobileComponent = ({
title,
src,
la... |
import { EventDTO, TrainerDTO } from '@hubbl/shared/models/dto';
import { EmptyHandler } from '@hubbl/shared/types';
import { Save } from '@mui/icons-material';
import { Button, Divider, Stack, Typography } from '@mui/material';
import DifficultyStack from '../../DifficultyStack';
import Base, { BaseProps } from '../B... |
import { IBreadcrumbList } from './breadcrumb-list.interface';
export interface IBreadcrumbCard {
businessId: string;
title: string;
list: IBreadcrumbList;
} |
import React, { useContext, useState } from "react";
import { Context as AppContext } from "../../context/app/context";
import {
toggleCreateLog,
addLog,
addNotification,
} from "../../context/app/actions";
import styled from "styled-components";
import SvgButton from "../../button/SvgButton";
import SendIcon fro... |
// Object MODEL CLASS
import * as mongoose from 'mongoose';
import IObject from '../interfaces/IObject';
// Schema definition of how the document (ROW) looks like
const objectSchema: mongoose.Schema = new mongoose.Schema({
objectID: { type: Number, required: true, unique: true },
objectName: { type: String, re... |
import React, { SVGAttributes } from 'react'
import { SerializedStyles, css } from '@emotion/core'
interface Props extends SVGAttributes<SVGElement> {
icon: string
extraCss?: SerializedStyles | SerializedStyles[]
}
/**
* These icons are pulled from svg-sprite.svg.
* To add a new icon, add a new group with an ID... |
import { EventEmitter } from 'events';
import ICommandWithResult from '~shared/interfaces/ICommandResult';
import {
IFocusRecord,
IFrontendMouseEvent,
IMouseEvent,
IScrollRecord,
ISessionTab,
} from '~shared/interfaces/ISaSession';
import ReplayTick, { IEventType } from '~backend/api/ReplayTick';
import IPain... |
import { Component, OnInit } from '@angular/core';
import {Router} from "@angular/router";
@Component({
selector: 'app-clients',
templateUrl: './clients.component.html',
styleUrls: ['./clients.component.css']
})
export class ClientsComponent implements OnInit {
constructor(private router: Router) { }
ngOnI... |
import { Image, ImageCrop, ImageHotspot } from '@sanity/types';
import React from 'react';
import { ObjectDiff } from '../../../diff';
interface HotspotCropSVGProps {
crop?: ImageCrop;
diff: ObjectDiff<Image>;
hash: string;
hotspot?: ImageHotspot;
width?: number;
height?: number;
}
export declar... |
import { Middleware } from 'redux';
const req = require.context('.', true, /.+\.middleware\.ts$/);
const middlewares: ReadonlyArray<Middleware> = req
.keys()
.map(key => req(key).default);
export default middlewares; |
import * as React from 'react';
import { NavLink } from 'react-router-dom';
import withStyles from '@material-ui/core/styles/withStyles';
import { pathHomePage } from '@constants/routes';
import { ILogoProps as Props } from './types';
import { DefaultLogo } from './icons';
import { styles } from './styles';
export con... |
import { Component, Watch } from 'vue-property-decorator';
import AppFormControlCrop from '../../../../../_common/form-vue/control/crop/crop.vue';
import AppFormControlUpload from '../../../../../_common/form-vue/control/upload/upload.vue';
import AppForm from '../../../../../_common/form-vue/form';
import {
BaseForm,... |
import {Artist, Album} from 'definitions';
import {DSEntity, DSArtist, DSAlbum, Release} from 'compactd-models';
interface StoreActionBase {
type: string;
};
export interface ToggleDownloadsAction {
type: 'cassette/store/TOGGLE_DOWNLOADS';
}
export interface ToggleSearchAction {
type: 'cassette/store/TOGGLE_SE... |
#!/usr/bin/env node
"use strict";
import * as _ from "lodash";
import PrefScore, { PrefScoreFollower, PrefScoreMain } from "preferans-score-js";
import { PrefDeckCard, TPrefDeckDeal, PrefDeckTrick } from "preferans-deck-js";
import APrefStage from "../stage/aPrefStage";
import PrefRoundPlayer from "./prefRoundPlayer... |
import httpException from 'src/http/httpException';
import projectNeedEditSchema from './joiSchemas/editProjectNeedCreateSchema';
import generateCustomErrors from './joiSchemas/helpers/generateCustomErrors';
/**
* @param {Object} req - the request object
* @param {Object} res - the response object
* @param {Func... |
import fs from "fs";
import path from "path";
const metadata: typeof import("music-metadata") = require("music-metadata");
async function getLocalAsSource(resource: string) {
if (!fs.existsSync(resource)) throw new Error("FILE_NOT_EXISTS");
const stat = await fs.promises.stat(resource);
if (!stat.isFile()) throw ... |
import React from 'react'
import { CodeSnippet, Language } from './CodeSnippet'
import { useValues } from 'kea'
import { teamLogic } from 'scenes/teamLogic'
function PythonInstallSnippet(): JSX.Element {
return <CodeSnippet language={Language.Bash}>{'pip install posthog'}</CodeSnippet>
}
function PythonSetupSnipp... |
// Type definitions for jquery-visible
// Project: https://github.com/customd/jquery-visible
// Definitions by: Andrey Lipatkin <https://github.com/Litee>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="jquery" />
type Direction = "horizontal" | "vertical" | "both";
interface... |
import { Named1, Named2 } from "external";
export function overloaded(arg: string): Named1;
export function overloaded(arg: number): Named2;
//# sourceMappingURL=types.d.ts.map |
import { createServerSideModule } from '@uni.js/server';
import { DroppedItemActor } from './dropped-item-entity';
import { PickDropController } from './pick-drop-controller';
export const PickDropModule = createServerSideModule({
controllers: [PickDropController],
entities: [DroppedItemActor],
}); |
import defineGetter from 'utils/defineGetter'
function definePowerSpawnGetter<T extends keyof StructureNuker>(
property: T,
handler: (self: StructureNuker) => StructureNuker[T],
) {
defineGetter<StructureNuker, StructureNukerConstructor, T>(
StructureNuker,
property,
handler,
)
}
definePowerSpawnG... |
import { Score } from 'app/models/Score';
import React from 'react';
export type ScoreProps = {
scores: Score[];
};
const ScoreDisplay: React.FC<ScoreProps> = (props: ScoreProps) => {
const scores = props.scores;
const orderedScores = scores.sort((a, b) => a.score - b.score).reverse();
return <div cla... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.