repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
agtenr/styled-fabricui-components
src/webparts/styleableBeer/components/beer/IBeerStyleProps.ts
<gh_stars>0 import { ITheme } from "office-ui-fabric-react"; export interface IBeerStyleProps { theme: ITheme; sipsTaken: number; }
agtenr/styled-fabricui-components
src/webparts/functionBasedStyled/components/IFunctionBasedStyledProps.ts
<reponame>agtenr/styled-fabricui-components<filename>src/webparts/functionBasedStyled/components/IFunctionBasedStyledProps.ts export interface IFunctionBasedStyledProps { description: string; }
agtenr/styled-fabricui-components
src/webparts/beerComponent/components/beer/Beer.tsx
import * as React from 'react'; import styles from "./Beer.module.scss"; import { css } from "office-ui-fabric-react/lib/Utilities"; import { IBeerProps } from "./IBeerProps"; export const Beer: React.SFC<IBeerProps> = (props: IBeerProps) => { let beerClass = styles.sips0; let voidClass = styles.sips5; switch (p...
agtenr/styled-fabricui-components
src/webparts/styleableBeer/components/beer/Beer.base.tsx
<gh_stars>0 import * as React from 'react'; import { classNamesFunction } from "office-ui-fabric-react/lib/Utilities"; import { IBeerStyleProps } from "./IBeerStyleProps"; import { IBeerStyles } from "./IBeerStyles"; import { IBeerProps } from "./IBeerProps"; const getClassNames = classNamesFunction<IBeerStyleProps, I...
agtenr/styled-fabricui-components
src/webparts/beerComponent/components/beer/IBeerProps.ts
<reponame>agtenr/styled-fabricui-components<gh_stars>0 export interface IBeerProps { sipsTaken: number; }
agtenr/styled-fabricui-components
src/webparts/classNameStyled/components/ClassNameStyled.tsx
<gh_stars>0 import * as React from 'react'; import styles from './ClassNameStyled.module.scss'; import { IClassNameStyledProps } from './IClassNameStyledProps'; import { Checkbox, PrimaryButton, Toggle } from "office-ui-fabric-react"; export default class ClassNameStyled extends React.Component<IClassNameStyledProps, ...
agtenr/styled-fabricui-components
src/webparts/beerComponent/loc/mystrings.d.ts
<gh_stars>0 declare interface IBeerComponentWebPartStrings { PropertyPaneDescription: string; BasicGroupName: string; DescriptionFieldLabel: string; } declare module 'BeerComponentWebPartStrings' { const strings: IBeerComponentWebPartStrings; export = strings; }
agtenr/styled-fabricui-components
src/webparts/beerComponent/components/BeerComponent.tsx
import * as React from 'react'; import styles from './BeerComponent.module.scss'; import { IBeerComponentProps } from './IBeerComponentProps'; import { IBeerComponentState } from './IBeerComponentState'; import { Beer } from "./beer/Beer"; import { PrimaryButton } from 'office-ui-fabric-react/lib/Button'; export defau...
agtenr/styled-fabricui-components
src/webparts/styleableBeer/components/IStyleableBeerState.ts
export interface IStyleableBeerState { sipsTaken: number; }
agtenr/styled-fabricui-components
src/webparts/classNameStyled/loc/mystrings.d.ts
declare interface IClassNameStyledWebPartStrings { PropertyPaneDescription: string; BasicGroupName: string; DescriptionFieldLabel: string; } declare module 'ClassNameStyledWebPartStrings' { const strings: IClassNameStyledWebPartStrings; export = strings; }
agtenr/styled-fabricui-components
src/webparts/classNameStyled/components/IClassNameStyledProps.ts
export interface IClassNameStyledProps { description: string; }
agtenr/styled-fabricui-components
src/webparts/componentCatalog/controls/CompanyCheckbox.tsx
<filename>src/webparts/componentCatalog/controls/CompanyCheckbox.tsx import * as React from 'react'; import { Checkbox, ICheckboxProps, ICheckboxStyleProps, ICheckboxStyles } from "office-ui-fabric-react"; export const CompanyCheckbox: React.SFC<ICheckboxProps> = (props: ICheckboxProps) => { const checkboxStyles = ...
agtenr/styled-fabricui-components
src/webparts/beerComponent/components/IBeerComponentState.ts
export interface IBeerComponentState { sipsTaken: number; }
agtenr/styled-fabricui-components
src/webparts/componentCatalog/controls/CompanyToggle.tsx
import * as React from 'react'; import { Toggle, IToggleProps, IToggleStyleProps, IToggleStyles } from "office-ui-fabric-react"; export const CompanyToggle: React.SFC<IToggleProps> = (props: IToggleProps) => { const toggleStyles = (styleProps: IToggleStyleProps): IToggleStyles => { const tglStyles: IToggleStyle...
agtenr/styled-fabricui-components
src/webparts/functionBasedStyled/components/FunctionBasedStyled.tsx
import * as React from 'react'; import styles from './FunctionBasedStyled.module.scss'; import { IFunctionBasedStyledProps } from './IFunctionBasedStyledProps'; import { Checkbox, PrimaryButton, Toggle, IToggleStyleProps, IToggleStyles, ICheckboxStyleProps, IButtonStyles, ICheckboxStyles } from "office-ui-fabric-react"...
agtenr/styled-fabricui-components
src/webparts/styleableBeer/components/beer/Beer.styles.ts
import { IBeerStyleProps } from "./IBeerStyleProps"; import { IBeerStyles } from "./IBeerStyles"; const GlobalClassNames = { container: "beer-Container", glass: "beer-Glass", handle: "beer-Handle", void: "beer-Void", foam: "beer-Foam", beer: "beer-Beer" }; export const getStyles = (props: IBeerStyleProps...
agtenr/styled-fabricui-components
src/webparts/componentCatalog/controls/CompanyPrimaryButton.tsx
import * as React from 'react'; import { PrimaryButton, IButtonProps, IButtonStyles } from "office-ui-fabric-react"; export const CompanyPrimaryButton: React.SFC<IButtonProps> = (props: IButtonProps) => { const buttonStyles = (): IButtonStyles => { const btnStyles: IButtonStyles = { root: { backgroundColo...
agtenr/styled-fabricui-components
src/webparts/functionBasedStyled/loc/mystrings.d.ts
<reponame>agtenr/styled-fabricui-components declare interface IFunctionBasedStyledWebPartStrings { PropertyPaneDescription: string; BasicGroupName: string; DescriptionFieldLabel: string; } declare module 'FunctionBasedStyledWebPartStrings' { const strings: IFunctionBasedStyledWebPartStrings; export =...
agtenr/styled-fabricui-components
src/webparts/styleableBeer/components/StyleableBeer.tsx
<filename>src/webparts/styleableBeer/components/StyleableBeer.tsx import * as React from 'react'; import styles from './StyleableBeer.module.scss'; import { IStyleableBeerProps } from './IStyleableBeerProps'; import { IStyleableBeerState } from './IStyleableBeerState'; import { PrimaryButton } from 'office-ui-fabric-re...
agtenr/styled-fabricui-components
src/webparts/componentCatalog/loc/mystrings.d.ts
<filename>src/webparts/componentCatalog/loc/mystrings.d.ts declare interface IComponentCatalogWebPartStrings { PropertyPaneDescription: string; BasicGroupName: string; DescriptionFieldLabel: string; } declare module 'ComponentCatalogWebPartStrings' { const strings: IComponentCatalogWebPartStrings; ex...
agtenr/styled-fabricui-components
src/webparts/styleableBeer/components/beer/IBeerProps.ts
import { IStyleFunctionOrObject, ITheme } from "office-ui-fabric-react"; import { IBeerStyleProps } from "./IBeerStyleProps"; import { IBeerStyles } from "./IBeerStyles"; export interface IBeerProps { sipsTaken: number; styles?: IStyleFunctionOrObject<IBeerStyleProps,IBeerStyles>; theme?: ITheme; }
agtenr/styled-fabricui-components
src/webparts/globallyStyled/components/GloballyStyled.tsx
<filename>src/webparts/globallyStyled/components/GloballyStyled.tsx import * as React from 'react'; import styles from './GloballyStyled.module.scss'; import { IGloballyStyledProps } from './IGloballyStyledProps'; import { Checkbox, PrimaryButton, Toggle } from "office-ui-fabric-react"; export default class GloballySt...
agtenr/styled-fabricui-components
src/webparts/styleableBeer/components/beer/IBeerStyles.ts
<filename>src/webparts/styleableBeer/components/beer/IBeerStyles.ts import { IStyle } from "office-ui-fabric-react"; export interface IBeerStyles { container?: IStyle; glass?: IStyle; handle?: IStyle; void?: IStyle; foam?: IStyle; beer?: IStyle; }
TulioAbreu/svelte-to-do
src/utils/cls.ts
export function cls(...args: string[]): string { return args.filter((str) => str).join(" "); }
TulioAbreu/svelte-to-do
src/store/todo-list.ts
<filename>src/store/todo-list.ts import { Writable, writable } from "svelte/store"; export type Todo = { readonly id: string; title: string; completed: boolean; description?: string; }; export interface TodoStorage extends Writable<Todo[]> { addTodo: (todo: Todo) => void; removeTodoById: (id: ...
theozordako/insomnia
packages/insomnia-app/app/common/export.ts
<filename>packages/insomnia-app/app/common/export.ts import { Insomnia4Data } from 'insomnia-importers'; import clone from 'clone'; import { database as db } from './database'; import * as har from './har'; import type { BaseModel } from '../models/index'; import * as models from '../models/index'; import { EXPORT_TY...
theozordako/insomnia
packages/insomnia-app/app/ui/components/dropdowns/content-type-dropdown.tsx
import React, { PureComponent } from 'react'; import { autoBindMethodsForReact } from 'class-autobind-decorator'; import { AUTOBIND_CFG, CONTENT_TYPE_FILE, CONTENT_TYPE_FORM_DATA, CONTENT_TYPE_FORM_URLENCODED, CONTENT_TYPE_GRAPHQL, CONTENT_TYPE_JSON, CONTENT_TYPE_YAML, CONTENT_TYPE_PLAINTEXT, CONTENT_...
MrWolfZ/pure-forms
src/update-function/util.ts
<filename>src/update-function/util.ts import { Action } from '../actions'; import { formArrayReducer } from '../array/reducer'; import { formControlReducer } from '../control/reducer'; import { formGroupReducer } from '../group/reducer'; import { AbstractControlState, isArrayState, isGroupState } from '../state'; expo...
MrWolfZ/pure-forms
src/control/value-converter.spec.ts
import { box } from '../boxing'; import { ValueConverters } from './value-converter'; describe('ValueConverters', () => { describe('default', () => { it('should return the same primitive view value', () => { const viewValue = 'A'; expect(ValueConverters.default<typeof viewValue>().convertViewToStateV...
MrWolfZ/pure-forms
index.ts
/** * pure-forms * Pure functional form state management * Written by <NAME>. * MIT license. * https://github.com/MrWolfZ/pure-forms */ export * from './src/pure-forms';
MrWolfZ/pure-forms
src/actions.ts
<gh_stars>0 import { FormControlId, KeyValue, ValidationErrors } from './state'; export interface Action { type: string; } // NOTE: the explicit type declaration for the `TYPE` properties is required // for the output declarations to properly use the literal string type instead // of just `string` export class Set...
MrWolfZ/pure-forms
validation/src/required-true.ts
<filename>validation/src/required-true.ts import { Boxed, unbox, ValidationErrors } from 'pure-forms'; /** * A validation function that requires the value to be `true`. Considers `null` and * `undefined` as valid. Combine this function with the `required` validation * function if `null` or `undefined` should be con...
MrWolfZ/pure-forms
src/actions.spec.ts
<filename>src/actions.spec.ts import { isPureFormsAction } from './actions'; describe(isPureFormsAction.name, () => { it('should return true if type is pure-forms/', () => { expect(isPureFormsAction({ type: 'pure-forms/' })).toBe(true); }); it('should return true if type startsWith pure-forms/', () => { ...
MrWolfZ/pure-forms
validation/validation.d.ts
export * from './validation/index';
MrWolfZ/pure-forms
validation/src/required.ts
import { Boxed, unbox, ValidationErrors } from 'pure-forms'; export interface RequiredValidationError<T> { actual: T | null | undefined; } // @ts-ignore declare module 'pure-forms/src/state' { export interface ValidationErrors { required?: RequiredValidationError<any>; } } /** * A validation function that...
MrWolfZ/pure-forms
validation/src/equal-to.spec.ts
<reponame>MrWolfZ/pure-forms import { AbstractControlState, box, unbox, validate } from 'pure-forms'; import { equalTo } from './equal-to'; describe(equalTo.name, () => { it('should not return an error if value is equal to comparand', () => { expect(equalTo(1)(1)).toEqual({}); }); it('should return an error...
MrWolfZ/pure-forms
src/pure-forms.spec.ts
<reponame>MrWolfZ/pure-forms<gh_stars>0 import { addArrayControl, addGroupControl, box, compose, createFormArrayState, createFormControlState, createFormGroupState, disable, enable, focus, formArrayReducer, formControlReducer, formGroupReducer, formStateReducer, isArrayState, isBoxed, ...
MrWolfZ/pure-forms
src/reducer.ts
import { Action } from './actions'; import { formArrayReducer } from './array/reducer'; import { formControlReducer } from './control/reducer'; import { formGroupReducer } from './group/reducer'; import { AbstractControlState, FormControlState, FormState, isArrayState, isFormState, isGroupState } from './state'; import...
MrWolfZ/pure-forms
src/pure-forms.ts
export * from './actions'; export { box, isBoxed, unbox, Boxed, Unboxed, UnboxedArray, UnboxedObject } from './boxing'; export { FormControlValueTypes, FormControlId, ValidationErrors, KeyValue, AbstractControlState, FormControlState, FormGroupControls, FormGroupState, FormArrayState, FormState, I...
aoarashi1988/react-useful-hoc
src/demo/components/user-form/index.tsx
<gh_stars>0 import { Form, Input } from 'antd'; import { useForm } from 'antd/lib/form/Form'; import withModalForm from '../../hocs/form-modal'; export function UserForm() { const [form] = useForm(); return ( <Form form={form}> <Form.Item label="姓名" name="name" rules={[{ required: true }]}> <Inpu...
aoarashi1988/react-useful-hoc
src/App.tsx
import './App.css'; import UserForm from './demo/components/user-form'; function App() { return ( <div className="App"> <UserForm /> </div> ); } export default App;
aoarashi1988/react-useful-hoc
src/hocs/form-modal/index.tsx
<reponame>aoarashi1988/react-useful-hoc import { cloneElement, MouseEventHandler, ReactElement, useState } from 'react'; import { Button } from 'antd'; import { useForm } from 'antd/lib/form/Form'; import Modal, { ModalProps } from 'antd/lib/modal/Modal'; interface WithFormModalOptions { renderTrigger?(): ReactEleme...
calendee/gotrue-js
src/index.ts
import GoTrueApi from './GoTrueApi' import GoTrueClient from './GoTrueClient' export { GoTrueApi, GoTrueClient }
calendee/gotrue-js
test/provider.test.ts
<filename>test/provider.test.ts import { GoTrueClient } from '../src/index' const GOTRUE_URL = 'http://localhost:9999' const auth = new GoTrueClient({ url: GOTRUE_URL, autoRefreshToken: false, persistSession: true, }) test('signIn() with Provider', async () => { let { error, url, provider } = await auth.sign...
calendee/gotrue-js
example/expo/App.tsx
import { StatusBar } from 'expo-status-bar' import React from 'react' import { StyleSheet, Text, View } from 'react-native' import { GoTrueClient } from '@supabase/gotrue-js' import { Styles } from './lib/Constants' import AsyncStorage from '@react-native-community/async-storage' import Button from './components/Button...
calendee/gotrue-js
src/lib/helpers.ts
<reponame>calendee/gotrue-js<gh_stars>0 export function uuid() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8 return v.toString(16) }) } export const isBrowser = () => typeof window !== 'undefined' ...
calendee/gotrue-js
example/expo/components/TextField.tsx
import React from 'react' import { TextInput, StyleSheet } from 'react-native' import { Styles } from '../lib/Constants' type TextFieldProps = { onChangeText: ((text: string) => void) | undefined text: string type?: 'none' | 'password' placeholder?: string } export default function TextField({ onChangeText, t...
calendee/gotrue-js
example/expo/components/Button.tsx
import React from 'react' import { GestureResponderEvent, StyleSheet, Text, TouchableOpacity } from 'react-native' import { Styles } from '../lib/Constants' type ButtonProps = { text: string onPress: ((event: GestureResponderEvent) => void) | undefined } export default function Button({ text, onPress }: ButtonPro...
calendee/gotrue-js
src/lib/constants.ts
<filename>src/lib/constants.ts<gh_stars>0 export const GOTRUE_URL = process.env.GOTRUE_URL || 'http://localhost:9999' export const AUDIENCE = process.env.AUDIENCE || '' export const DEFAULT_HEADERS = {} export const EXPIRY_MARGIN = process.env.EXPIRY_MARGIN || 60 * 1000 export const STORAGE_KEY = process.env.STORAGE_KE...
calendee/gotrue-js
example/expo/lib/Constants.ts
export const Styles = { fontNormal: 20, fontMedium: 28, fontLarge: 34, fontExtraLarge: 40, colorPrimary: 'black', spacing: 12, }
Acinho/css-element-queries
css-element-queries.d.ts
export { ResizeSensor, ResizeSensorCallback } from "./src/ResizeSensor"; export { ElementQueries } from './src/ElementQueries';
Acinho/css-element-queries
src/ElementQueries.d.ts
<filename>src/ElementQueries.d.ts<gh_stars>1000+ export declare class ElementQueries { /** * Attaches to DOMLoadContent */ static listen(): void; /** * Parses all available CSS and attach ResizeSensor to those elements which have rules attached. * Make sure this is called after 'load' event, because ...
Acinho/css-element-queries
tests/mutation/app.ts
declare const ResizeSensor; const state: { dragged: Element } = { dragged: null }; let i = 0; for (const item of document.getElementsByClassName('drag')) { i++; item.setAttribute('draggable', 'true'); item.setAttribute('id', 'drag-' + i); (element => { const title = 'Drag me #' + i; ...
tom-sherman/chalk
index.d.ts
<gh_stars>1-10 export const enum Level { /** * All colors disabled. */ None = 0, /** * Basic 16 colors support. */ Basic = 1, /** * ANSI 256 colors support. */ Ansi256 = 2, /** * Truecolor 16 million colors support. */ TrueColor = 3 } export interface Options { /** * Enable or disable Cha...
Bleuh/mini-api
seed.ts
import mongoose from "mongoose"; import Product from "./src/database/products/products.model"; Product.create({ _id: mongoose.Types.ObjectId('56cb91bdc3464f14678934ca'), name: "mini-figure", price: 15 });
Bleuh/mini-api
src/services/auth.service.ts
//src/services/auth.service.ts import { Request, Response } from "express"; import jwt from "express-jwt"; import jsonwebtoken from "jsonwebtoken"; import bcrypt from "bcryptjs"; import { ACCESS_TOKEN_SECRET } from "../constants/miniApi.constants"; import User from "../database/users/users.model"; import { IUser } f...
Bleuh/mini-api
src/database/products/products.model.ts
<reponame>Bleuh/mini-api import { model } from "mongoose"; import { IProduct } from "./products.types"; import ProductSchema from "./products.schema"; const Product = model<IProduct>("product", ProductSchema); export default Product;
Bleuh/mini-api
src/database/users/users.model.ts
<reponame>Bleuh/mini-api import { model } from "mongoose"; import { IUser } from "./users.types"; import UserSchema from "./users.schema"; const User = model<IUser>("user", UserSchema); export default User;
Bleuh/mini-api
src/database/orders/orders.types.ts
<reponame>Bleuh/mini-api import { Document } from "mongoose"; import { IUser } from "../users/users.types"; import { IProduct } from "../products/products.types"; import { ORDERS_STATUS_PENDING, ORDERS_STATUS_PRODUCTION, ORDERS_STATUS_COMPLETE, ORDERS_STATUS_SHIPPED, } from "../../constants/miniApi.constants"; ...
Bleuh/mini-api
src/app.ts
<gh_stars>1-10 //src/app.ts import express, { Application } from "express"; //importing our controller import { Controller } from "./main.controller"; import bodyParser from "body-parser"; import cors from "cors"; class App { public app: Application; //declaring our controller public mainController: Controlle...
Bleuh/mini-api
src/services/factory.service.ts
//src/services/factory.service.ts import { Request, Response } from "express"; import Order from "../database/orders/orders.model"; import { ORDERS_STATUS_PENDING, ORDERS_STATUS_PRODUCTION, } from "../constants/miniApi.constants"; import RequestUtil from "./requestUtil.service"; import { Status } from "../database...
Bleuh/mini-api
src/database/orders/orders.schema.ts
import { Schema } from "mongoose"; import ProductSchema from "../products/products.schema"; import UserSchema from "../users/users.schema"; const OrdersSchema = new Schema({ user: UserSchema, items: [{ _id: { type: Schema.Types.ObjectId, index: true, required: true, auto: true, }, ...
Bleuh/mini-api
src/database/users/users.schema.ts
import { Schema } from "mongoose"; const UserSchema = new Schema({ login: String, password: String, dateOfEntry: { type: Date, default: new Date(), }, lastUpdated: { type: Date, default: new Date(), }, }); export default UserSchema;
Bleuh/mini-api
src/services/mini.service.ts
<filename>src/services/mini.service.ts //src/services/mini.service.ts import { Request, Response, Express } from "express"; import User from "../database/users/users.model"; import Order from "../database/orders/orders.model"; import RequestUtil from "./requestUtil.service"; import Product from "../database/products/p...
Bleuh/mini-api
test/services/mini.service.test.ts
import request from "supertest"; import app from "../../src/app"; describe("MiniService", () => { test("endPointsList", (done) => { request(app).post("/").expect("Content-Type", /json/).expect(200, done); }); describe("getOrders", () => { test("unauthorized", (done) => { request(app) .post...
Bleuh/mini-api
src/server.ts
<reponame>Bleuh/mini-api //src/server.ts import * as dotenv from "dotenv"; dotenv.config(); import app from "./app"; import connect from "./connect"; import { PORT, MONGO_URL } from "./constants/miniApi.constants"; connect({ db: MONGO_URL }); app.listen(PORT, () => console.log(`Listening on port ${PORT}`));
Bleuh/mini-api
test/services/requestUtil.service.test.ts
<gh_stars>1-10 import RequestUtil from "../../src/services/requestUtil.service"; describe("Test RequestUtil", () => { describe("checkFields", () => { test("default", () => { const { ok, extra, miss } = RequestUtil.checkFields(["field"], ["field"]); expect(ok).toStrictEqual(true); expect(extra)....
Bleuh/mini-api
src/main.controller.ts
<reponame>Bleuh/mini-api<filename>src/main.controller.ts<gh_stars>1-10 //src/main.controller.ts import { Application, Response, Request, NextFunction, Errback } from "express"; import { MiniService } from "./services/mini.service"; import { AuthService } from "./services/auth.service"; import { FactoryService } from "...
Bleuh/mini-api
src/database/orders/orders.model.ts
import { model } from "mongoose"; import { IOrder } from "./orders.types"; import OrderShema from "./orders.schema"; const Order = model<IOrder>("order", OrderShema); export default Order;
Bleuh/mini-api
src/constants/miniApi.constants.ts
//src/constants/hezflixApi.constants.ts export const PORT = process.env.PORT || 3000; export const MONGO_URL = "mongodb://mongodb:27017/data"; export const ACCESS_TOKEN_SECRET = "test"; export const ORDERS_STATUS_PENDING = "Pending"; export const ORDERS_STATUS_PRODUCTION = "Production"; export const ORDERS_STATUS_COMP...
thinca/node-vimhelp
test/vimhelp.test.ts
import {expect} from "chai"; import proxyquire = require("proxyquire"); import {execVim} from "../src/exec_vim"; import {VimHelp, RTPProvider} from "../src/vimhelp"; let execVimStub = execVim; const VimHelpProxied = proxyquire("../src/vimhelp", { "./exec_vim": { execVim: (vimBin: string, commands: string[]) => e...
thinca/node-vimhelp
test/index.test.ts
<reponame>thinca/node-vimhelp<filename>test/index.test.ts import {expect} from "chai"; import * as index from "../src"; describe("vimhelp", () => { describe("index", () => { it("has VimHelp class", () => { expect(index).to.have.property("VimHelp").and.a("function"); }); it("has PluginManager class...
thinca/node-vimhelp
test/plugin_manager.test.ts
<gh_stars>10-100 import {expect} from "chai"; import * as fs from "fs"; import {join as pathJoin} from "path"; import {execFileSync} from "child_process"; import * as tempModule from "temp"; import {PluginManager, UpdateInfo} from "../src/plugin_manager"; const temp = tempModule.track(); process.on("unhandledRejectio...
thinca/node-vimhelp
src/vimhelp.ts
import {execVim} from "./exec_vim"; export type RTPProvider = () => string[]; export class VimHelp { helplang: string[]; rtpProvider?: () => string[]; constructor( public vimBin = "vim", ) { this.vimBin = vimBin; this.helplang = []; } search(word: string): Promise<string> { const safeWor...
thinca/node-vimhelp
src/index.ts
export {VimHelp} from "./vimhelp"; export {PluginManager} from "./plugin_manager";
thinca/node-vimhelp
src/plugin_manager.ts
import {execFile} from "child_process"; import fs from "fs"; import {join as pathJoin} from "path"; import {RTPProvider} from "./vimhelp"; import {execVim} from "./exec_vim"; function execGit(args: string[], options = {}): Promise<string> { return new Promise((resolve, reject) => { const defaultOptions = {env: ...
thinca/node-vimhelp
src/exec_vim.ts
<reponame>thinca/node-vimhelp import {spawn} from "child_process"; export function execVim(vimBin: string, commands: string[]): Promise<string> { return new Promise((resolve, reject) => { const vim = spawn(vimBin, [ "-u", "NONE", "-i", "NONE", "-N", "-Z", "-X", "-R", "-e", "-s" ]); const resu...
MohammedTaha/Angular2Sample
src/app/seed-app.ts
<reponame>MohammedTaha/Angular2Sample import {Component} from 'angular2/core'; import {Router, Route, RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router'; import {Home} from './components/home/home'; import {About} from './components/about/about'; import {Details} from './components/details/details'; @Component({ ...
MohammedTaha/Angular2Sample
src/app/components/home/home.ts
<filename>src/app/components/home/home.ts import {Component} from 'angular2/core'; import {Http} from 'angular2/http'; import {Router} from 'angular2/router'; import 'rxjs/Rx'; @Component({ selector: 'home', templateUrl: 'app/components/home/home.html', styleUrls: ['app/components/home/home.css'], providers: [...
MohammedTaha/Angular2Sample
src/app/components/details/details.ts
/** * Created by MTA on 4/8/2016. */ import {Component, OnInit} from 'angular2/core'; import {RouteParams} from 'angular2/router'; import {Http} from 'angular2/http'; @Component({ selector: 'details-viewer', templateUrl: 'app/components/details/details.html' }) export class Details implements OnInit{ privat...
gregmbi/polyaxon
sdks/ts/http_client/v1/src/apis/RunProfilesV1Api.ts
// Copyright 2018-2020 Polyaxon, 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 agre...
gregmbi/polyaxon
sdks/ts/http_client/v1/src/models/V1Init.ts
// Copyright 2018-2020 Polyaxon, 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 agre...
gregmbi/polyaxon
sdks/ts/http_client/v1/src/apis/RunsV1Api.ts
// Copyright 2018-2020 Polyaxon, 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 agre...
gregmbi/polyaxon
sdks/ts/http_client/v1/src/apis/HubModelsV1Api.ts
// Copyright 2018-2020 Polyaxon, 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 agre...
gregmbi/polyaxon
sdks/ts/http_client/v1/src/models/V1ArtifactKind.ts
// Copyright 2018-2020 Polyaxon, 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 agre...
UNT-CSCE-Club/website
components/common/MobileMenu/useMobileMenu.ts
<reponame>UNT-CSCE-Club/website import useClickAway from 'lib/hooks/useClickAway'; import React, { useRef } from 'react'; type MobileMenuHook = (Params: { toggle: React.Dispatch<React.SetStateAction<boolean>>; }) => { menuRef: React.RefObject<HTMLDivElement> }; const useMobileMenu: MobileMenuHook = ({ toggle }) => ...
UNT-CSCE-Club/website
components/common/Nav/Nav.tsx
<reponame>UNT-CSCE-Club/website import React from 'react'; import Link from 'next/link'; import useNav from './useNav'; import { classNames } from 'lib/classNames'; import { MobileMenu } from 'components/common'; import { DiscordMenu, Logo, Notifications } from 'components/ui'; import { SiDiscord } from 'react-icons/si...
UNT-CSCE-Club/website
pages/index.tsx
import { GetStaticProps } from 'next'; import { NextSeo } from 'next-seo'; import client from 'lib/contentful'; import { Entry } from 'contentful'; import { HomePageFields } from 'types'; import { About, Contact, Events, Hero, Officers, Workshops, } from 'components/home'; interface HomePageProps { page:...
UNT-CSCE-Club/website
components/home/Workshops/Workshops.tsx
import React from 'react'; import { DynamicIcon } from 'components/ui'; import { WorkshopsFields } from 'types'; interface WorkshopsProps { data: WorkshopsFields; } const Workshops = ({ data }: WorkshopsProps) => { const { title, description, workshops } = data; return ( <section id='workshops' className='...
UNT-CSCE-Club/website
components/home/About/About.tsx
<reponame>UNT-CSCE-Club/website import React from 'react'; import { ChatAlt2Icon, UserGroupIcon } from '@heroicons/react/outline'; import { AboutFields } from 'types'; interface AboutProps { data: AboutFields; } const About = ({ data }: AboutProps) => { const { title, description, section1Title, s...
UNT-CSCE-Club/website
pages/_app.tsx
<reponame>UNT-CSCE-Club/website<filename>pages/_app.tsx<gh_stars>1-10 import React from 'react'; import type { AppProps } from 'next/app'; import { DefaultSeo } from 'next-seo'; import '../styles/globals.css'; import SEO from 'next-seo.config'; import { Layout } from 'components/common'; function MyApp({ Component,...
UNT-CSCE-Club/website
components/ui/DiscordMenu/DiscordMenu.tsx
<gh_stars>1-10 import React from 'react'; import { Transition } from '@headlessui/react'; interface DiscordMenuProps { open: boolean; setOpen: React.Dispatch<React.SetStateAction<boolean>>; position: string; } const DiscordMenu = ({ open, setOpen, position }: DiscordMenuProps) => { return ( <Transition ...
UNT-CSCE-Club/website
components/ui/DynamicIcon/DynamicIcon.tsx
import React from 'react'; import dynamic from 'next/dynamic'; import { DogeSvg } from 'components/ui'; interface Props extends React.SVGProps<SVGSVGElement> { name: string; } const DynamicIcon = ({ name, ...rest }: Props) => { let Icon; const iconSet = name.slice(0, 2); if (name === 'doge') return <DogeSvg...
UNT-CSCE-Club/website
components/common/Footer/useFooter.ts
import React, { useRef, useState } from 'react'; import useClickAway from 'lib/hooks/useClickAway'; type FooterHook = () => { discordMenuOpen: boolean; setDiscordMenuOpen: React.Dispatch<React.SetStateAction<boolean>>; discordRef: React.RefObject<HTMLDivElement>; }; const useFooter: FooterHook = () => { const...
UNT-CSCE-Club/website
components/common/Layout/Layout.tsx
<reponame>UNT-CSCE-Club/website import React, { useState } from 'react'; import { Footer, Nav } from 'components/common'; const Layout: React.FC = ({ children }) => { const [mobileMenuOpen, setMobileMenuOpen] = useState(false); return ( <> <Nav open={mobileMenuOpen} setOpen={setMobileMenuOpen} /> ...
UNT-CSCE-Club/website
components/ui/DogeSvg/index.ts
<filename>components/ui/DogeSvg/index.ts export { default } from './DogeSvg';
UNT-CSCE-Club/website
components/common/index.ts
<reponame>UNT-CSCE-Club/website export { default as Layout } from './Layout'; export { default as Nav } from './Nav'; export { default as MobileMenu } from './MobileMenu'; export { default as Footer } from './Footer';
UNT-CSCE-Club/website
components/home/Contact/Contact.tsx
<gh_stars>1-10 import React from 'react'; import { FiSend } from 'react-icons/fi'; import { ContactFields } from 'types'; interface ContactProps { data: ContactFields; } const Contact = ({ data }: ContactProps) => { const { title, description, contactFormTitle } = data; return ( <section id='contact'> ...
UNT-CSCE-Club/website
components/ui/Notifications/Notifications.tsx
import React from 'react'; import { Transition } from '@headlessui/react'; interface NotificationsProps { open: boolean; setOpen: React.Dispatch<React.SetStateAction<boolean>>; position: string; } const Notifications = ({ open, setOpen, position }: NotificationsProps) => { return ( <Transition show=...
UNT-CSCE-Club/website
types/index.ts
<reponame>UNT-CSCE-Club/website // Generated by https://quicktype.io export interface HomePageFields { hero: Hero; about: About; events: Events; workshops: Workshops; officers: Officers; contact: Contact; } export interface About { metadata: Metadata; sys: PurpleSys; fields: AboutFields; } export i...