text stringlengths 10 953k |
|---|
/// <reference path="../jsx.d.ts" />
import { assertEquals } from 'https://deno.land/std/testing/asserts.ts';
import { React } from '../mod.ts';
const View = () => {
return <div innerHTML="<b>hello</b> world" />;
};
if (import.meta.main) {
(<View />).render().then(console.log);
} else {
Deno.test('render... |
import { ListItemClassKey } from './ListItem';
export type ListItemClasses = Record<ListItemClassKey, string>;
declare const listItemClasses: ListItemClasses;
export function getListItemUtilityClass(slot: string): string;
export default listItemClasses; |
export const effectiveTypescripting = () => {
console.log('Effective Typescripting');
}; |
import { createMemoryHistory } from 'history';
import React from 'react';
import { MemoryRouter, Router } from 'react-router-dom';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import SignupPage from '.';
describe('SignupPage 테스트', () => {
const signu... |
import ReactGA from 'react-ga'
import { Dispatch } from 'redux'
import addProvider from './addProvider'
import { getNetworkId, getNetworkInfo } from 'src/config'
import { NOTIFICATIONS, enhanceSnackbarForAction } from 'src/logic/notifications'
import enqueueSnackbar from 'src/logic/notifications/store/actions/enqueue... |
import { useContext, useContextState } from './hooks';
import { State, Params } from './state';
const context = new State({
state: 0,
methods: {
add: ({ state, payload }: Params<number, number>) => state + payload,
remove: ({ state, payload }: Params<number, number>) => state + payload,
not: ({ state }... |
import React from 'react'
export const PreloaderCircle = () => {
return (
<>
<svg className="animate-spin -ml-1 mr-3 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24">
<circle className="opacity-25" cx="12" cy="12" r="10" str... |
import { Command } from "discord-akairo";
import { Message } from "discord.js";
import { exec } from "child_process";
export default class ExecCommand extends Command {
public constructor() {
super("exec", {
aliases: ["exec", "execute"],
args: [
{
id: "execution",
type: "... |
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DesktopSettingsComponent } from './desktop-settings.component';
describe('DesktopSettingsComponent', () => {
let component: DesktopSettingsComponent;
let fixture: ComponentFixture<DesktopSettingsComponent>;
beforeEach(async(() =... |
import * as React from 'react';
import {Icon, iconEnums} from './icons';
import {IMarkdownEntry} from '../../../../../../model/trainer/markdownEntry';
import {markdownEntryConstants} from '../markdownEntryConstants';
import { FontGroupComponent, LinksGroupComponent, ListGroupComponent, CommandGroupComponent } from './g... |
export * from "./EarnDepositModal"; |
import AuthLayout, { AuthPage } from '@condo/domains/user/components/containers/AuthLayout'
import { SignInForm } from '@condo/domains/user/components/auth/SignInForm'
import { useIntl } from '@core/next/intl'
import { Col, Row, Typography } from 'antd'
import Head from 'next/head'
import React from 'react'
import { Bu... |
import { LocaleData } from '../locale/locale.class';
export declare const kaLocale: LocaleData; |
export enum AvTransactionType {CREATE, UPDATE, DELETE, REFRESH} |
import { WebPlugin } from "@capacitor/core";
import { FirebaseAnalyticsPlugin, FirebaseInitOptions } from "./definitions";
export declare class FirebaseAnalyticsWeb extends WebPlugin
implements FirebaseAnalyticsPlugin {
private not_supported_mssg;
private options_missing_mssg;
private duplicate_app_mssg;
priv... |
/* global it, expect, describe */
import { render } from '../src/index'
// SHOULD TEST COMMON ETA USAGE PATTERNS HERE
const eachTemplate = `
The Daugherty's have 5 kids:
<ul>
<% it.kids.forEach(function(kid){ %>
<li><%= kid %></li>
<% }) %>
</ul>`
describe('Helper tests', () => {
it('parses a simple array foreach... |
export const registerCode = `import React from "react";
import { useForm } from "react-hook-form";
export default function App() {
const { register, handleSubmit } = useForm();
const onSubmit = data => console.log(data);
return (
<form onSubmit={handleSubmit(onSubmit)}>
<input name="firstName" ref=... |
import {AbstractObject} from "./_abstract_object";
export class AuthorizationObject extends AbstractObject {
public getType(): string {
return "SUSO";
}
} |
import { runCommand } from '../../util/command';
import { detailOutputFormat } from './util';
export = {
command: 'show <id>',
desc: 'Show template',
handler: argv => {
runCommand(argv, async (client, output) => {
const template = await client.templates.get(argv.id, {
fields: ['id', 'name', 'kind', 'disabl... |
import { keygen, newHttpClient, randomID } from "../test-utils.ts";
import { assertEquals } from "https://deno.land/std@0.136.0/testing/asserts.ts";
import { afterAll } from "https://deno.land/std@0.136.0/testing/bdd.ts";
import { SAddCommand } from "./sadd.ts";
import { SDiffCommand } from "./sdiff.ts";
const client ... |
import joi from 'joi';
import { middleware, schemaValidation, tokenValidation } from '../components';
import {
Ground, Resolvers, MutationUpdateGroundArgs, MutationDeleteGroundArgs, MutationCreateGroundArgs,
} from '../types/graphql.type';
import { ROLE } from '../components/constants';
import GroundService from '..... |
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { NgModule } from '@angular/core';
import { CreateSingleChatComponent } from './create-single-chat.component';
@NgModule({
declarations: [
CreateSingleChatComponent
],
imports: [
CommonModul... |
import {shuffle} from '.';
import {stddev} from './math';
const iterations = 1e5;
describe('sample', () => {
it('shuffles arrays', () => {
const array = ['a', 'b', 'c', 'd'];
const frequencies = {
abcd: 0,
abdc: 0,
acbd: 0,
acdb: 0,
adbc: 0,
adcb: 0,
bacd: 0,
badc: 0,
bcad: 0,
bcda:... |
import React from "react";
import { createMaterialBottomTabNavigator } from "@react-navigation/material-bottom-tabs";
import { MaterialIcons as Icon } from "@expo/vector-icons";
import { Dimensions } from "react-native";
/** */
import Home from "../../pages/Toolbar/Home";
import Graduation from "../../pages/Toolbar/Gra... |
import Io from '../src/io';
import { Rabbit } from '../src/rabbit';
import { join } from 'path';
import uuidv4 from 'uuid/v4';
const rabbitCog = join(__dirname, 'data', 'cog.rabbit.json');
describe('rabbit, topic', () => {
[
[Buffer.from([1,2,3,4])],
['string'],
[10],
[{foo: {test: [1, 2, 3]}, bar: ... |
import Knex from 'knex'
import app from '../../app'
import { Workspace } from '../../models/workspace.model'
import { dropWorkspace } from '../../utils/dropWorkspace'
const workspaceService = app.services.workspace
const knexService = app.get('knex') as Knex
describe('createWorkspaceSQLSchema hook', () => {
it('cre... |
export * from '../../utilities/selection/index';
export * from '../GroupedList/GroupedList.types';
export * from './DetailsList';
export * from './DetailsList.types';
export * from './DetailsRow';
export * from './DetailsRowCheck';
export * from './DetailsFooter.types'; |
/* eslint-disable */
/**
import {getPositions} from './get-attribute-from-geometry';
export function computeBoundingSphere(geometry: any, boundingBox: object, vector: Vector3 ) {
const positions = getPositions(geometry);
const center = getBoundingBox(center);
box.setFromBufferAttribute(position);
box.getCente... |
import { Dispatch } from 'redux'
import uniqueId from 'lodash/uniqueId'
import {actions} from './action'
import {Tstore} from './store'
const mapStoreToProps = (store:Tstore) => {
return {todos: store.todos}
}
const mapDispatchToProps = (dispatch:Dispatch) => {
const dispatch_addTodo = (text:string) => {
c... |
import React, { useState, useRef } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { Icon } from 'react-icons-kit';
import {
SectionId,
SET_SECTION_TITLE,
DELETE_SECTION,
UPDATE_SECTION_ORDER
} from './store/section';
import { SET_VIZ_SECTION } from './store/visualization';
import {... |
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { MatIconModule, MatButtonModule, MatTooltipModule, MatBadgeModule } from '@angular/material'
import { BtnContentLikeComponent } from './btn-content-like.component'
@NgModule({
declarations: [BtnContentLikeComponent],
im... |
import { h, reactive, createApp, ref } from 'vue'
import { CompilerOptions } from '@vue/compiler-dom'
import { BindingTypes } from '@vue/compiler-core'
export const ssrMode = ref(false)
export const compilerOptions: CompilerOptions = reactive({
mode: 'module',
filename: 'Foo.vue',
prefixIdentifiers: false,
ho... |
import {DrawingResult} from "../../models/drawing-result";
export abstract class Pick3WebScrapingBaseService {
protected constructor() {
}
public abstract getPastWinningDrawingNumber(drawingState: string, drawingDate: Date, drawingTime: string): Promise<DrawingResult>;
public abstract getCurrentWinnin... |
import React from 'react'
import ScrollButton from '@components/molecules/scroll-button'
import styled from '@emotion/styled'
const Base = styled.div`
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: calc(100vh - 1rem);
padding: 10px 0px;
font-size:... |
// Type definitions for non-npm package Amazon Connect Streams API 1.3
// Project: https://github.com/aws/amazon-connect-streams
// Definitions by: Andy Hopper <https://github.com/andyhopp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
declare namespace connect {
/**
... |
import React, { Component } from "react";
import { Property } from "csstype";
import "./Col.css";
import { classNames } from "@agustinmj/class-names";
export interface ColProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
flex?: number;
className?: string;
style?:... |
import { Provider } from 'react-redux';
import { mount, shallow } from 'enzyme';
import React, { ReactElement } from 'react';
import { store } from '../../domain/app/state/AppStore';
export const mountWithProvider = (children: ReactElement) =>
mount(<Provider store={store}>{children}</Provider>);
export const shal... |
import React from 'react';
import { assert, test, _ } from 'spec.ts';
import { animated, Trail } from '../..';
import { SpringValues } from '@autorelease/core';
const View = animated('div');
declare const items: number[];
test('basic usage', () => (
<Trail items={items} from={{ opacity: 0 }} to={{ opacity: 1, colo... |
/**
* Copyright Zendesk, Inc.
*
* Use of this source code is governed under the Apache License, Version 2.0
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/
import React, { InputHTMLAttributes } from 'react';
import PropTypes from 'prop-types';
import { composeEventHandlers } from '@zendeskgarden/contain... |
import {
ITimberLog,
ITimberOptions,
LogLevel,
Middleware,
Sync
} from "@timberio/types";
import { makeBatch, makeThrottle } from "@timberio/tools";
// Types
type Message = string | Error;
// Set default options for Timber
const defaultOptions: ITimberOptions = {
// Default sync endpoint:
endpoint: "htt... |
import React, { useContext, ReactElement } from 'react'
import { get } from 'lodash'
import { Lang, DEFAULT_LANG } from './config'
import { Locale } from './locales'
const i18nContext = React.createContext<{
lang: Lang
locale: Locale | {}
}>({ lang: DEFAULT_LANG, locale: {} })
export type Translator = UnwrapDicti... |
import * as __aws_sdk_middleware_stack from "@aws-sdk/middleware-stack";
import * as __aws_sdk_types from "@aws-sdk/types";
import * as _stream from "stream";
import { GetDataflowEndpointGroup } from "../model/operations/GetDataflowEndpointGroup";
import { InputTypesUnion } from "../types/InputTypesUnion";
import { Out... |
import { Application } from 'express';
export type TRoutesInput = {
app: Application;
}; |
var models = require('../sequelizer/models/index');
var uuid = require('node-uuid');
import response = require('../dataAccessLayer/dataAccessLayerResponse');
import DTO = require('./DTO/CustomerDTO');
var sequelize = models.sequelize;
export function createUser(argUserDTO: DTO.CustomerDTO, successcallback, errorca... |
import { UserService } from './../../../users/user.service';
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'sf-file-upload',
template: `
<div id='droparea'>
Drop .xlsx files here to upload
</div>
<div id='uploadfile' >
<ejs-uploader #defaultupload [autoUpload]='false' [dro... |
const MINUTE = 60;
const HOUR = MINUTE * 60;
const DAY = HOUR * 24;
const MONTHS = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Ago',
'Sep',
'Oct',
'Nov',
'Dec',
];
export function padTimeNumber(num: number): string {
const numStr = '00' + num;
return numStr.substring(numStr.length ... |
import { Node } from '@alfresco/js-api';
import { Component } from '@angular/core';
import { TrainingCompanyService } from 'app/services/training-company.service';
import { PersonBodyUpdate } from '@alfresco/js-api';
import { EcmUserService } from '@alfresco/adf-core';
import {MatButtonModule} from '@angular/material/... |
import { BackgroundColor, GlobalVar, Parent, Scenes, WebGL } from '../../../../../phaser-genesis/src/config';
import { AddChild } from '../../../../../phaser-genesis/src/display/';
import { Game } from '../../../../../phaser-genesis/src/Game';
import { ImageFile } from '../../../../../phaser-genesis/src/loader/files/I... |
export * from './IGetCalendarEventRsvpOptions';
export * from './IGetCalendarEventOptions';
export * from './IGetCalendarOptions';
export * from './IGetCalendarEventsOptions';
export * from './IGetCalendarRsvpOptions';
export * from './IGetCalendarEventAttendeeOptions';
export * from './IGetCalendarRsvpAttendeeOptions'... |
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
import { ApplicationAutoScalingClient } from "./ApplicationAutoScalingClient";
import {
DeleteScalingPolicyCommand,
DeleteScalingPolicyCommandInput,
DeleteScalingPolicyCommandOutput,
} from "./commands/DeleteScalingPolicyCommand";
impor... |
/**
* @license
* Copyright 2018-2020 Streamlit 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 applicab... |
/*
* Copyright (C) 2017 TypeFox and others.
*
* 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
*/
import { injectable, inject } from 'inversify';
i... |
import { Component, OnInit } from '@angular/core';
import { RxFormBuilder,RxFormGroup } from '@rxweb/reactive-form-validators';
import { User } from './user.model';
@Component({
selector: 'app-RxFormGroup-modelInstance',
templateUrl: './rxformgroup-modelinstance.component.html'
})
export class RxformgroupMode... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgZorroAntdModule } from 'ng-zorro-antd';
import { ChartsEmptyComponent } from './charts-base/charts-empty/charts-empty.component';
import { ChartsLoadingComponent } from './charts-base/charts-loading/charts-loading.comp... |
import { MyPackageDependencyCollection } from "./MyPackageDependencyCollection";
/**
* Provides a set of all dependencies required for performing linting.
*/
export class LintEssentials extends MyPackageDependencyCollection
{
/**
* Initializes a new instance of the {@link LintEssentials `LintEssentials`} cl... |
// Copyright (c) Aptos
// SPDX-License-Identifier: Apache-2.0
import {
Center, IconButton, SimpleGrid, useColorMode,
} from '@chakra-ui/react';
import { IoMdImage } from 'react-icons/io';
import { RiCopperCoinFill } from 'react-icons/ri';
import React from 'react';
import { useLocation } from 'react-router-dom';
imp... |
import { D2ManifestDefinitions } from 'app/destiny2/d2-definitions';
import { t } from 'app/i18next-t';
import { showItemPicker } from 'app/item-picker/item-picker';
import { AppIcon, faRandom, lockIcon } from 'app/shell/icons';
import { PlugCategoryHashes } from 'data/d2/generated-enums';
import React, { Dispatch } fr... |
import styled, { css } from 'styled-components';
import { animated } from 'react-spring';
interface ToastProps {
type?: 'info' | 'success' | 'error';
hasDescription: boolean;
}
const toastTypeVariation = {
info: css`
background: #ebf8f0;
color: #777777;
`,
success: css`
background: #e6fffa;
... |
import { IPCamOptions } from './reecam.types';
export type ConfigUser = {
email: string;
alias: string;
};
export type ConfigRoot = {
users: ConfigUser[];
cams: IPCamOptions[];
}; |
import classNames from 'classnames';
import { ComponentClassNames } from '../../shared';
import { View } from '../../View';
import { useDeprecationWarning } from '../../../hooks/useDeprecationWarning';
/**
* @deprecated These icons are being removed in the next major release. You can use the [react-icons](https://re... |
import * as path from 'path';
import {
ScriptTarget,
ModuleKind,
TranspileOutput,
transpileModule,
CompilerOptions
} from 'typescript';
import { readFile, outputJson, outputFile as fsOutputFile } from 'fs-extra';
import { debug } from '../util/log';
/**
* Downlevels a .js file from ES2015 to ES5. Internally... |
/**
* Checks if two dom rectangles are overlap
* @param firstArea
* @param secondArea
*/
export function overlap(firstArea: DOMRect, secondArea: DOMRect): boolean {
return !(
firstArea.right < secondArea.left ||
firstArea.left > secondArea.right ||
firstArea.bottom < secondArea.top ||
... |
import { DateTimePropertyTypeFormat, PropertyType, UnixTimestampPropertyTypeFormat } from '../../types'
// magic copied from https://stackoverflow.com/a/54930905
// allows candidate to be typed as any
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const isNumericString = (candidat... |
import type { document } from "../../../github.com/OpenZWave/device_configuration";
const config: Partial<document> = {
Product: {
Revision: 6,
MetaData: [
{
MetaDataItem: [
{
text: "http://www.openzwave.com/device-database/0086:0081:0102",
name: "OzwInfoPage",... |
// import { createClient } from 'redis';
// import Redis from 'ioredis';
// import * as createRedisStore from 'connect-redis';
import * as session from 'express-session';
import * as passport from 'passport';
import { ConfigService } from '@nestjs/config';
// import MongoStore from 'connect-mongo';
// const MongoStore ... |
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { MiscellaneousComponent } from './miscellaneous.component';
import { NotFoundComponent } from './not-found/not-found.component';
import { NotAuthorizedComponent } from './not-authorized/not-authorized.component';
... |
/* tslint:disable */
/**
* This is an autogenerated file created by the Stencil compiler.
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from '@stencil/core/internal';
export namespace Components {
interface UcSideDrawer {
'open': b... |
import React, { useState } from "react";
import Selection from "../../../../data/Selection";
import styled from "styled-components";
import { faPaperPlane } from "@fortawesome/free-solid-svg-icons";
import TextButton from "../../../form_elements/TextButton";
import P2PSender from "../../../p2p/P2PSender";
import Forma... |
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { AccountComponent } from './account/account.component';
import { NewAccountComponent } from './new-account/new-account.component';
import { AccountsService } from... |
/**
* Created by Moiz.Kachwala on 15-06-2016.
*/
import mongoose = require("mongoose");
interface BookModel extends mongoose.Document {
title: string,
year: number,
author: string
}
export = BookModel; |
import { useHistory, useParams } from 'react-router-dom';
import { database } from '../services/firebase';
import { Button } from '../components/Button';
import { Question } from '../components/Question';
import { RoomCode } from '../components/RoomCode';
import { useRoom } from '../hooks/useRoom';
import deleteImg f... |
import React, {
createContext,
CSSProperties,
ReactElement,
ReactNode,
useState,
} from "react"
export interface ThemeContext {
style?: CSSProperties
setStyle: (style?: CSSProperties) => void
}
export const themeContext = createContext<ThemeContext>({
setStyle: () => void null,
})
interface Props {
... |
import React from 'react';
import { SvgIcon, SvgIconProps } from '@material-ui/core';
import { ReactComponent as StakeIcon } from './images/stake.svg';
export default function Stake(props: SvgIconProps) {
return <SvgIcon component={StakeIcon} viewBox="0 0 34 34" {...props} />;
} |
import handle from "./index";
import CPU from "../../../cpu";
import Memory from "../../../../memory/memory";
import EventBus from "../../../../event-bus";
describe("JMP", () => {
test("Should JMP", () => {
const cpu = new CPU();
const memory = new Memory(new EventBus);
const PC = 10;
... |
/*
* Copyright 2018 The boardgame.io Authors
*
* Use of this source code is governed by a MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
import * as ActionCreators from '../core/action-creators';
import { InMemory } from '../server/db/inmemory';
import {... |
<TS language="it" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Fare click col pulsante destro per modificare l'indirizzo o l'etichetta</translation>
</message>
<message>
<source>Create a new add... |
import { IStory } from './../Models/Story';
import { HnapiService } from './../hnapi.service';
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { Input } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'hn-list',
templateUrl: './list.compon... |
import { parseTypeOnly } from "../../src/api"
import { AstInterface, AstNamedInterface, AstProperty } from "../../src/ast"
describe("AST Specification for Nested Types", () => {
test("an anonymous interface nested in a interface", () => {
const source = `
interface I1 {
a: {
b: string
}
}
`
con... |
<%#
Copyright 2013-2018 the original author or authors from the JHipster project.
This file is part of the JHipster project, see http://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You ma... |
/*
MIT License
Copyright (c) 2021 Looker Data Sciences, Inc.
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, modi... |
import styled from 'styled-components'
import { motion } from 'framer-motion'
export const Container = styled.div`
display: flex;
`
export const ContainerNavLink = styled(Container)`
@media only screen and (max-width: 776px) {
display: ${({ open }) => (open ? 'block' : 'none')};
background-color: #2b3c96;
... |
export class User {
firstName: string;
middleName: string;
lastName: string;
constructor(fname: string, mname: string, lname: string) {
this.firstName = fname;
this.middleName = mname;
this.lastName = lname;
}
getFullname() {
let name: string = `${this.firstName}`;
if (this.middleName) ... |
import { Controller, Get, Param, ParseIntPipe } from '@nestjs/common';
import { DepositService } from './deposit.service';
@Controller('deposit')
export class DepositController {
constructor(private readonly depositService: DepositService) {}
@Get()
public async getAllDeposits() {
const deposits = await thi... |
throw new Error('Unable to load @wdio/sync package.') |
/**
* Include angular2 dependencies including HTTP dependencies
* and Injectable and Inject
*/
import { Injectable } from '@angular/core';
import { Http, Headers } from '@angular/http';
/**
* Import the ngrx configured store
*/
import { Store } from '@ngrx/store';
import { AppState } from './../store/appState.sto... |
import { Action } from 'redux'
import c from './constants'
import { Loading, PayloadAction } from './types'
export type ShowLoadingAction = PayloadAction<c.SHOW_LOADING, Loading>
export type HideLoadingAction = PayloadAction<c.HIDE_LOADING, Loading>
export type ShowErrorAction = PayloadAction<c.SHOW_ERROR, Error>
expo... |
import React from 'react';
import { StyleSheet, View } from 'react-native';
interface IHeaderButtonContainer {
children: React.ReactNode;
left?: boolean;
}
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center'
},
left: {
marginLeft: 5
},
ri... |
import WebGLShader from './Shader';
export default class WebGLFragment extends WebGLShader {
constructor(source: string);
} |
import React from 'react';
import { extract } from '../lib/extract/extractProps';
import { NumberProp } from '../lib/extract/types';
import Shape from './Shape';
import { RNSVGCircle } from './NativeComponents';
export default class Circle extends Shape<{
cx?: NumberProp;
cy?: NumberProp;
r?: NumberProp;
}> {
... |
import { BaseModel } from './base.model';
import { Injectable, Inject } from '@angular/core';
export class TourScheduleSpec extends BaseModel {
static fromJsonList(array): TourScheduleSpec[] {
return array.map(TourScheduleSpec.fromJson);
}
static getColumns(): any {
return {
des... |
import * as React from 'react';
import axios from 'axios';
import { Typography, Progress, message } from 'antd';
import { FileTextTwoTone, CloseCircleOutlined } from '@ant-design/icons';
import { useReduxData } from '@src/hooks/useRedux';
import { useSubject, ofAction } from '@src/hooks/useSubject';
import {
MessageC... |
import {Component, EventEmitter, Input, OnChanges, OnInit, Output} from '@angular/core';
import {AlertGroupModel, AlertModel, AssetModel} from "../../../shared/models";
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { AlertGroupsStoreFacade } from "../alertgroups/store/alertgroups-store-fac... |
import { sub } from 'date-fns'
import { IDBPDatabase, openDB } from 'idb'
import { useCallback, useRef } from 'react'
import { generateId } from '../../../lib/string'
let db: IDBPDatabase<LocalSnapshot> | null = null
const dbName = 'local-snapshots'
const storeName = 'local-snapshots'
async function getDb(): Promise<... |
export class Cashback {} |
import { Component, OnInit } from '@angular/core';
import { HttpHeaders, HttpResponse } from '@angular/common/http';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { IOperation } from '../operation.model';
import { ITEMS_PER_PAGE } from 'app/config/pagination.constants';
import { OperationService } fro... |
import { Log } from "../mod.ts";
const log = new Log();
log.debug("debug");
log.info("info", true, null);
log.warn(["warning", 1, 2.4]);
try {
Deno.readFileSync("not-exist.txt");
} catch (error) {
log.error({ error });
} |
import {
Snackbar,
SnackbarControlRef,
SnackbarProvider,
useSnackbar,
} from '@terra-dev/snackbar';
import {
IconButton,
SnackbarContent as MuiSnackbarContent,
SnackbarContentProps,
} from '@material-ui/core';
import { Close } from '@material-ui/icons';
import React, { ComponentType, useRef } from 'react'... |
import * as React from 'react';
import PropTypes from 'prop-types';
import { MuiStyles, WithStyles, withStyles } from '@material-ui/core/styles';
import Clock from './Clock';
import { pipe } from '../internal/pickers/utils';
import { useUtils, useNow, MuiPickersAdapter } from '../internal/pickers/hooks/useUtils';
impor... |
/// <reference path='fourslash.ts' />
// @allowJs: true
// @Filename: /a.js
////const { x: { a, b } } = /*a*/require/*b*/("x");
goTo.select("a", "b");
edit.applyRefactor({
refactorName: "Convert to ES6 module",
actionName: "Convert to ES6 module",
actionDescription: "Convert to ES6 module",
newConten... |
import {
BaseEntity,
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
} from 'typeorm';
@Entity('profiles')
export default class Profile extends BaseEntity {
@PrimaryGeneratedColumn('increment')
id: number;
@Column({ type: 'varchar', unique: true, length: 100 })
email: s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.