lang
stringclasses
10 values
seed
stringlengths
5
2.12k
typescript
import { AuthorizeHttpClientDecorator } from '@/main/decorators' import { makeLocalStorageAdapter } from '@/main/factories/cache/local-storage-adapter-factory' import { makeAxiosHttpClient } from '@/main/factories/http/axios-http-client-factory' import { HttpClient } from '@/data/protocols/http' export const makeAutho...
typescript
return PersistState({ ...state, searchTerm: data.name, episodesArray: data._embedded.episodes, movieCast: [] }); case CONSTANTS.STATE_SET_SEASON_NUMBER: return PersistState({ ...state, seasonNumber: data }); case CONSTANTS.STATE_SET_MOVIE_ID: return Pers...
typescript
@Prop({ required: false, default: i18n.t("COMMON.NO_RESULTS") }) public noDataMessage: string; public render(createElement: CreateElement): VNode { return createElement( VueGoodTable, { props: { mode: this.isRemote ? "remote" : "local", sortOptions: { enabled...
typescript
import { Report } from '../../models/Report'; import { Team } from '../../models/Team'; import { TableItem } from '../../models/Table'; import { AngularFireDatabase, FirebaseObjectObservable, FirebaseListObservable } from 'angularfire2/database'; import {UserService} from '../user/user.service'; @Injectable() export c...
typescript
import * as Portfolio from './../portfolio'; import * as Reports from './../../filings/metrics/reports'; import * as Summary from './../summary'; export interface Snapshot { date?: string; portfolio: any[]; stocks: any[]; }; import * as _ from 'lodash';
typescript
constructor( private APIService: ApiDataService, private override: OverrideService, private _snackBar: MatSnackBar ) { } async save(url: string, body: any, headers?: HttpHeaders, contentType?: any) { return await this.APIService.post(url, body, headers, contentType); }
typescript
} /> </div> </div> </> ); };
typescript
io.to(user.room).emit("roomUsers", { room: user.room, users: getUsersInARoom(user.room) }) } }) }) server.listen(PORT, () => console.log(`Listening on port ${PORT}`) )
typescript
/** * * * @param authenticationKey The AuthenticationKey retrieved when sign-in into the system */ getDuplicatedMacsWithHttpInfo(authenticationKey?: string, extraHttpRequestParams?: any): Observable<Response>; /** * * * @param deviceId
typescript
<gh_stars>0 import 'google-closure-library/closure/goog/events/listenermap'; import alias = goog.events.ListenerMap; export default alias;
typescript
import * as React from "react"; import { JSX } from "react-jsx"; import { IFluentIconsProps } from '../IFluentIconsProps.types'; const SplitHorizontal48Filled = (iconProps: IFluentIconsProps, props: React.HTMLAttributes<HTMLElement>): JSX.Element => { const { primaryFill, className } = iconProps; return ...
typescript
* {@docCategory ColorPicker} */ export declare class ColorSliderBase extends React.Component<IColorSliderProps, IColorSliderState> implements IColorSlider { static defaultProps: Partial<IColorSliderProps>; private _events;
typescript
/** @internal */ public static readonly __pulumiType = 'aws-native:glue:MLTransform'; /** * Returns true if the given object is an instance of MLTransform. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isI...
typescript
export default class Transactions implements Iterable<any> { private blockIterator: Blocks; private blockHeight: number = 1; private txIdx: number = 0; private block; constructor() { this.blockIterator = new Blocks(); this.block = this.blockIterator[0]; } public [Symbol.ite...
typescript
interface Window { webkitAudioContext: typeof AudioContext; finishDraw: any; queueFrame: (f: TimerHandler) => void; } declare module '*.gba';
typescript
import Viewer from './Viewer'; it('renders without crashing', () => { const div = document.createElement('div'); ReactDOM.render(<Viewer userPlaceGroup={{type: 'FeatureCollection', id: 'user', title: '', features: []}} places={[]} mapInteraction={'Select'}/>, div); ReactDOM.unmountComponentAtNode(div); })...
typescript
} public onMessage(callback: (Message) => void) { this._msgCallback = callback; } public close(): void { if(this._sock != null) { this._sock.close(); } }
typescript
import { IonicPage, NavController, NavParams, Content } from 'ionic-angular'; import { DetailTransaksiPage } from '../detail-transaksi/detail-transaksi'; /** * Generated class for the DaftarTransaksiPage page. * * See https://ionicframework.com/docs/components/#navigation for more info on * Ionic pages and navigat...
typescript
import { apiClient } from '../../client'; import { Machine } from '../../types'; export function getMachines(): Promise<Machine[]> { return apiClient .get({ url: `machines`, }) .then((res) => res.json()); }
typescript
} function installFantomas() { let result = runOnShell('dotnet tool install fantomas-tool -g'); return result.output; }
typescript
return; } const { graph } = this; if (this.delegateRect) { this.delegateRect.remove(); this.delegateRect = null; } if (this.target) { const delegateShape = this.target.get('delegateShape'); if (delegateShape) { delegateShape.remove();
typescript
@Resolver(() => Search) export class SearchResolver { constructor(private readonly searchService: SearchService) {} @Query(() => Search, { name: 'search' }) async search(@Args('searchInput') searchInput: SearchInput) { return this.searchService.orchestrateSearch(searchInput); } }
typescript
export default importAll } declare module '*.mdx' { let MDXComponent: (props) => JSX.Element export default MDXComponent }
typescript
} from '@react-native-community/cli-types'; export default function unregisterNativeModule( _name: string, dependencyConfig: IOSDependencyConfig, projectConfig: IOSProjectConfig, // FIXME: Add type signature here otherDependencies: Array<any>,
typescript
const marks = Array.from(grid.element.querySelectorAll(`.${props.cssClass}-mark`)) .map((mark) => mark.textContent); const values = props.prettify ? props.pointsMap.map(([, value]) => props.prettify?.(String(value))) : props.pointsMap.map(([, value]) => String(value));
typescript
public openSearchPage() { this.router.navigate( ['search'], {queryParams: {query: this.searchControl.value}} ); } public isPerson(result: SearchResult): boolean { return result.type === MEDIA_TYPE.PERSON; } public displayFn(result: Person|Title): st...
typescript
import { MongoHelper } from "../helpers/mongo-helper"; export class AccountMongoRepository implements AddAccountRepository, loadAccountByEmailRepository, UpdateAccessTokenRepository { async add(account: AddAccountModel): Promise<AccountModel> { const accountCollection = await MongoHelper.getCollection('acc...
typescript
export class UserDTO { id: number; username: string; email?: string; isLocked?: boolean; emailConfirmation?: boolean; role: string; isActive: boolean; }
typescript
import alert from '../utils/alert'; import hash_table from './hash-table'; import ipc from 'node-ipc'; let IDS_Hash_Table = new hash_table(); ipc.config.id = "File-Integrity-Monitor"; ipc.config.retry = 1500; ipc.config.silent = true; let PID : NodeJS.Timeout; ipc.serve(()=>{ ipc.server.on("start", ()=>{
typescript
interface DateOfBirth { date: string; age: number; } interface Name { title: string; first: string; last: string;
typescript
expect(rx.next).to.have.been.calledTwice; expect(rx.next.firstCall).to.have.been.calledWith(2); expect(rx.next.secondCall).to.have.been.calledWith(4); }); it('should concatenate the values in the order passed in', () => { const input$ = of(1, 2, 3); const predicate = (n: number) ...
typescript
"link": "http://localhost:8080/windup-web-services/rest-furnace/graph/132660/edges/763136/OUT/stats.fileTypes", "direction": "OUT" } }, "_id": 763136 } ...
typescript
export const getHeightStyle = ({ theme, appearance = 'default', baseAppearance = 'default', }: IItemProps): FlattenSimpleInterpolation | string => { const height = itemAppearanceTheme(theme, appearance, baseAppearance, 'height'); return height ? css` height: ${height}px; `
typescript
{...getLayout()} > <TimePicker format={format} {...restProps} /> </FormItem> </Col> <Col span={24}> <FormItem name="endTime" label={lang.endTime} ...
typescript
import userRoutes from './handlers/user'; const app = express(); const port = process.env.PORT || 5000; app.use(bodyParser.json()); adminRoutes(app); userRoutes(app);
typescript
import { AuthenticateCustomerController } from "./modules/accounts/usecases/AuthenticateCustomer/AuthenticateCustomerController"; import { AuthenticateDeliverymanController } from "./modules/accounts/usecases/AuthenticateDeliveryman/AuthenticateDeliverymanController"; import { CreateCustomerController } from "./modules...
typescript
import { Content } from '../enum/Content'; export interface ICell { isOpened: boolean; content: Content; hasMine: boolean; adjacentMinesCount:number | null; }
typescript
import { transformBlurToEffect } from '../transformBlurToEffect'; describe('transformBlurToEffect', () => { it('blur radius', () => { const result = transformBlurToEffect({ blurRadius: 4 }); expect(result).toMatchSnapshot(); }); });
typescript
import styles from "./layout.module.scss"; const Layout: React.FC<any> = ({ children }) => { return <div className={styles["page-layout"]}>{children}</div>; };
typescript
public get hasSelectedFiles(): boolean { return this.uploadDataService.hasSelectedFiles; } public ngOnInit(): void { } public createConvertUploadFileAndCheckValidity(): OperatorFunction<FileLoadEvents<any>, FileLoadEvents<TypedFiles>> { return map((data: FileLoadEvents<any>): FileLo...
typescript
removeFilter(id:number) { } saveMeasurement(measurement:any) { measurement.RetentionPolicyName = measurement.ID+"_"+measurement.RetentionPolicyDuration; } removeMeasurement(id:number) { }
typescript
/** column: `public.dim_date.date_actual`, not null: `true`, regtype: `date` */ date_actual: Date; /** column: `public.dim_date.day_suffix`, not null: `true`, regtype: `character varying(4)` */ day_suffix: string; } }
typescript
import useVisible from 'commonComponents/useVisible'; import React, { FunctionComponent } from 'react'; import ViewWikiPageControl from './ViewWikiPageControl'; type Props = { } const DocumentSection: FunctionComponent<Props> = () => { // const {setRoute} = useRoute() // const handleCompose = useCallback(() ...
typescript
...Array.from(calculateBoundariesMap(swimlaneRanges).values()) ) return { label, unitHeight: columnsForSwimlane }
typescript
required: true, maxLength: 255, minLength: 1, }, userName: { required: true, maxLength: 255, minLength: 1, }, email: { required: true,
typescript
export interface TaskParam { description: string; name: string; value: string; }
typescript
import { GoogleSignin } from '@react-native-google-signin/google-signin'; GoogleSignin.configure({ webClientId: '534984563068-oco707sll12l1n215j6ucnc5237p41nm.apps.googleusercontent.com', }); export default GoogleSignin;
typescript
export const initialExperienceState: ExperienceState = { search: "", sort: EXPERIENCE_SORT[0], viewable: [], typeFilter: null, tagFilter: [], projectFilter: [], }; const experienceSlice = createSlice({
typescript
) .map(stylesheet => axios.get(stylesheet.href)); // Also grab any inline styles, used predominantly in development. const styleBlocks = Array.prototype.slice .apply(document.querySelectorAll('style')) .map(node => node.innerText);
typescript
baseUrl: 'https://api.tinkoff.ai/v1/', json: true, headers: { Authorization: `bearer ${token}`, } }) } protected async request(method: 'get' | 'post' | 'put' | 'delete' | 'head' | 'patch', command: string, params?: Record<string, any>): Pr...
typescript
declare const flutter: { painting: { alignment: (this: void, x: number, y: number) => Alignment; }; }; export class Alignment extends JITAllocatingRTManagedBox<undefined, Alignment> implements RuntimeBaseClass { public readonly internalRuntimeType = new Type(Alignment); public props = undefined...
typescript
import {mockAssignee, mockTask, mockTaskCtx} from "test-utils/mocks" import {render, screen} from "test-utils/render" test("shows task details", () => { render( <TaskContext.Provider value={mockTaskCtx}> <TaskDetails id={mockTask.id} /> </TaskContext.Provider>,
typescript
registered: new Date('11/02/2016 10:30:00'), hide: true } ]; this.loaded = true; } // addUser() { // this.user.isActive = true; // this.user.registered = new Date();
typescript
<gh_stars>1-10 import { ColumnComponent } from "./ColumnComponent"; import { Component } from "../../Component"; import { GridLayout } from "./GridLayout"; export class RowComponent extends Component { constructor(rowCount = () => 1) { super("Row"); this.style= () => { return { ...
typescript
const ast = parser.parse(program); expect(ast).toEqual({ type: ASTNodeType.Program, body: [ { type: ASTNodeType.ExpressionStatement, expression: { type: ASTNodeType.LogicalExpression, operator: "&&", left: { type: ASTNode...
typescript
} > {this.props.children} </ThemeContext.Provider> ); } }
typescript
focused?: boolean; pressed: boolean; }; export declare type InteractionStyleType = StyleProp<ViewStyle> | ((interactionState: InteractionState) => StyleProp<ViewStyle>); export declare type InteractionChildrenType = React.ReactNode | ((interactionState: InteractionState) => React.ReactNode); export declare func...
typescript
} test(async function server() { try { // 等待服务启动 await startHTTPServer(); const res = await fetch(testSite);
typescript
/** * Resource Type definition for AWS::SageMaker::CodeRepository */ export function getCodeRepository(args: GetCodeRepositoryArgs, opts?: pulumi.InvokeOptions): Promise<GetCodeRepositoryResult> { if (!opts) { opts = {} }
typescript
fill="#F44336" /> <path d="M11.8334 1.3415L10.6584 0.166504L6.00002 4.82484L1.34169 0.166504L0.166687 1.3415L4.82502 5.99984L0.166687 10.6582L1.34169 11.8332L6.00002 7.17484L10.6584 11.8332L11.8334 10.6582L7.17502 5.99984L11.8334 1.3415Z" fill=...
typescript
import {CommonKeysOf} from "./CommonKeysOf"; export type UncommonKeysOf<A extends {}, B extends {}> = Exclude<keyof A | keyof B, CommonKeysOf<A, B>>
typescript
{path: '', redirectTo: 'pool-stats', pathMatch: 'full'}, {path: 'pool-stats', component: PoolStatsComponent }, {path: 'worker-lookup', component: WorkerLookupComponent }, {path: 'top-miners', component: TopMinerStatsComponent }, { path: '**', redirectTo: 'pool-stats', pathMatch: 'full' } ]; export ...
typescript
model: this.model }; return stack.resolve( handler<ListLunaClientsInput, ListLunaClientsOutput>( handlerExecutionContext ), handlerExecutionContext ); } }
typescript
import { themeDecorator } from "@/storybookUtils"; import { TransferTokenForm } from "./TransferTokenForm"; export const Standard: React.FC = () => <TransferTokenForm />; export default { title: "Components/TransferTokenForm", decorators: [themeDecorator()], component: TransferTokenForm, };
typescript
<li>The base of all pitch names is one of the seven letters: A, B, C, D, E, F, G. We do not use more than seven letters to name pitches because most Western music is based on 7-note <Term>scales</Term> which use each letter exactly once. We will cover <Term>scales</Term> in a future lesson.</li> <li>The 7 n...
typescript
export default function capitalize(str: string, allWords = false): string { if (allWords) return str.replace(/\b[a-z]/g, (char) => char.toUpperCase()); return str.replace(/^[a-z]/, (char) => char.toUpperCase()); }
typescript
error: 'Not Implemented yet', result: null }) export interface OperationOutcome { error: any result: any }
typescript
getCoffeeorder():Observable<any>{ return this.httpClient.get(this.API+'/coffeeorder'); } getCustomer():Observable<any>{ return this.httpClient.get(this.API+'/customer'); } getOrdertype():Observable<any>{ return this.httpClient.get(this.API+'/ordetytpe'); }
typescript
import * as mongoose from 'mongoose'; export const UserModel = new mongoose.Schema( { Name: String, email: String, password: String, resetLink: {
typescript
} | null; isSignatureNegotiation: boolean; bucketSignatureCache: {}; region: string; port: number | null; timeout: number; obsSdkVersion: string; isCname: boolean; bucketEventEmitters: {}; useRawXhr: boolean; encodeURIWithSafe: typeof encodeURIWithSafe; mimeTypes: { ...
typescript
{ code: 'NLD', name: 'Netherlands', latitude: 52.132633, longitude: 5.291266, volunteers: 3, organizations: 0 }, { code: 'NOR', name: 'Norway', latitude: 60.472024, longitude: 8.468946, volunteers: 0, organizations: 0 }, { code: 'NPL', name: 'Nepal', latitude: 28.394857, longitude: 84.124008, volunteers: 2,...
typescript
} export interface FocusInterface extends UseFocusInterface { onFocus?: () => void children: (props: InjectedFocusProps) => ReactElement } export type CallbackEventType = (() => void) | (() => boolean) | null export interface DeviceInterface { subscribe: (type: string, callback: CallbackEventType) => void
typescript
stock(this.props.screenshotOptions); } componentDidMount() { capture(); } render() { return <>{this.props.children}</>; } } export function withScreenshot(opt: Partial<ScreenShotOptions> = {}) { return (storyFn: Function, ctx: StoryKind | undefined) => { const wrapperWithContext = (contex...
typescript
import words from './words'; import toString from './toString'; /** * @ignore */ const reQuotes = /['\u2019]/g; /** * Converts `string`, as space separated words, to lower case. * * @since 5.6.0 * @category String * @param str The string to convert. * @returns Returns the lower cased string.
typescript
// } public trackEvent(options: { name: string;
typescript
const val = obj[toLookAt]; if (!!val) { if (hardcoded(val)) { logger.info("Value of %s: '%s' is hard coded", toLookAt, val); comments.push(new DefaultReviewComment("info", HardcodePropertyCategory, `Hardcoded property ${...
typescript
} } catch (e) { console.error(e); this.setState({ error: true }); }
typescript
Error404Component, HasRoleDirective, LoginComponent, LoginRegisterComponent, SubjectsComponent, SubjectsModalComponent,
typescript
import 'antd/dist/antd.css' const About = () => ( <span> about <button onClick={() => popupStore.close('DELETE_PROJECT')}>close</button> </span> ) About.drawerProps = {} export default () => ( <div style={{ margin: '200px' }}> {/* <button onClick={() => popupStore.open('about')}>open</button> */}
typescript
search = async (filters: GoalSearchFilters): Promise<GoalSearchResults> => { return await this._goalRepo.search(filters); }; update = async (id: string, goalDomainModel: GoalDomainModel): Promise<GoalDto> => { return await this._goalRepo.update(id, goalDomainModel); };
typescript
flexShrink: 1, backgroundColor: theme.palette.primary.dark }, container: { justifyContent: "center", alignItems: "center", display: "flex", }, })); const Footer = () => { const classes = useStyles(); const [isWatching, setIsWatching] = useState(false);
typescript
import application from './application/reducer' import burn from './burn/reducer' import { combineReducers } from '@reduxjs/toolkit' import create from './create/reducer' import limitOrder from './limit-order/reducer' import lists from './lists/reducer' import mint from './mint/reducer' import multicall from './multica...
typescript
haystackIndex: number; } let Pointer = ({haystackIndex}: PointerProps) => { const pointer = Array(haystackIndex + 2).join(" ") + "^"; return ( <samp className="pointer"> <span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span>{pointer}</span>
typescript
import type { ConversionOfEnum, ConversionOf, BuildRegex, Config, GrexJS, } from "./types"; export type { ConversionOfEnum, ConversionOf, BuildRegex, Config, GrexJS };
typescript
hash = hash & hash; // Convert to 32bit integer } return hash; }; @Component({ selector: 'sneat-invite-links', templateUrl: './invite-links.component.html', styleUrls: ['./invite-links.component.scss'], }) export class InviteLinksComponent implements OnChanges, OnDestroy { @Input() public team?: ITeamContext;
typescript
// }; const s = Symbol(); // OK だった const o3: Obj = { x: 1, [Symbol()]: 2, }; export {}
typescript
constructor(private http:Http) { } public getArticleList() { return this.http.get(this.articleUrl + "/article/page/0").map(res=> res.json()); }
typescript
import { Logo, StyledHeader } from './styles'; import { VideoCameraFilled } from '@ant-design/icons'; const UIHeader = () => { return ( <StyledHeader> <Logo> <VideoCameraFilled /> Movie List </Logo>
typescript
MdxToken__factory, SwapMining, SwapMining__factory, Oracle, Oracle__factory, } from "../../../../../typechain"; import { assertAlmostEqual } from "../../../../helpers/assert"; import { formatEther } from "ethers/lib/utils";
typescript
import React from 'react'; import { Form } from 'antd'; import LoginForm from '../../components/LoginForm/LoginForm'; export default class LoginPage extends React.Component<any, any> { render() { const WrappedForm = Form.create()(LoginForm); return (<WrappedForm />);
typescript
import Validator from 'fastest-validator'; const validate = new Validator(); const schema = { message: { type: 'string', min: 1, max: 500, trim: true }, $$strict: true, }; export default validate.compile(schema);
typescript
import { MailerService } from '@nestjs-modules/mailer'; import { Injectable } from '@nestjs/common'; import { MailDto } from './mailDto'; import * as path from '@nestjs/common' @Injectable() export class AppService { constructor(
typescript
setLoom(balance) }) return () => { subscription.unsubscribe(); effect.cleanup() } }) useEffect(() => {
typescript
formatBalance({ amountInBaseUnits: TESTVAL.muln(10), baseDecimals: 12, tokenSymbol: 'Unit', }).formatted, ).toEqual('1.23 Unit'); }); it('formats 123,456,789,000 * 100 (decimals=12)', (): void => { expect( formatBalance({
typescript
<td>{props.data.types.length}</td> </tr> <tr> <td>Raretés</td> <td>{props.data.rarities.length}</td> </tr> </tbody>
typescript
async sendEmail(emailReq: AWS.SES.SendEmailRequest) {} } export class MockSNS { constructor(config: AWS.SNS.ClientConfiguration) {} async publish(message: AWS.SNS.PublishInput) {} }
typescript
(typeof v === 'number' || v === null) ) { return <any>this.dfs$edu_princeton_cs_algs4_EdgeWeightedDigraph$int(G, v); } throw new Error('invalid overload'); } private dfs$edu_princeton_cs_algs4_EdgeWeightedDigraph$int(
typescript
export const Example = () => { return ( <Center> <VStack space={3}> <Checkbox value="red" size="sm" defaultIsChecked> UX Research </Checkbox> <Checkbox size="md" defaultIsChecked value="green"> UX Research </Checkbox> <Checkbox value="yellow" size...
typescript
private _wrapV = TextureWrapMode.Repeat; // tslint:enable:variable-name /** How overflowing UVs are handled horizontally. */ public get wrapU() { return this._wrapU; } public set wrapU(val) { this._wrapU = val; } /** How overflowing UVs are handled vertically. */ public get wrapV()...
typescript
interface Props { proposalModel: ProposalModel; projectsModel: ProjectsModel; }