lang
stringclasses 10
values | seed
stringlengths 5
2.12k
|
---|---|
typescript | name: userName,
avatarUrl: avatarUrl
},
text,
likedBy: [] as string[], |
typescript | expect(resp.headers['content-type']).toBeDefined();
expect(resp.headers['content-type']).toBe('audio/mp3');
});
it('should throw error when messageId is invalid', async () => {
const senderInfoId = '5a1bcedcac017e4514ea28bb';
const messageId = 'badmsg00001';
expect.hasAssertions();
try {
const resp = await api.execute(
createEndPoint(senderInfoId, messageId, api.token), |
typescript | mockUseRouter.mockImplementationOnce(() => {
return { query: {} };
});
const props = {
title: 'Blog Title'
};
const component = await renderer.create(<Header {...props} />);
expect(component.toJSON()).toMatchSnapshot();
});
test('renders blog header with preview vse query string link', async () => {
mockUseRouter.mockImplementationOnce(() => {
return { query: { vse: 'test-vse.domain' } };
});
const props = { |
typescript | export function render(node: JSX.Element, parent: Element): void {
const element = node.createElement({});
parent.appendChild(element);
}
|
typescript | 'static/empty-no-file-selected.svg'
)
interface INoChangesProps {
/** Called when the user chooses to open the repository. */
readonly onOpenRepository: () => void
}
/** The component to display when there are no local changes. */
export class NoChanges extends React.Component<INoChangesProps, {}> {
public render() {
const opener = __DARWIN__ |
typescript | size: number
mode: number // Note: maybe this should be an enum, but we don't have a good description, and it shouldn't be used externally
}
export class DataTransferUploadRequestCommand extends BasicWritableCommand<DataTransferUploadRequestProps> {
public static readonly rawName = 'FTSD'
public serialize(): Buffer {
const buffer = Buffer.alloc(16)
buffer.writeUInt16BE(this.properties.transferId, 0)
buffer.writeUInt16BE(this.properties.transferStoreId, 2)
buffer.writeUInt16BE(this.properties.transferIndex, 6)
buffer.writeUInt32BE(this.properties.size, 8) |
typescript | export type {ErrorLogger} from './types';
export {createBugsnagClient} from './client';
export {Bugsnag} from './Bugsnag';
export {useErrorLogger} from './hooks';
export {ErrorLoggerContext} from './context';
|
typescript | let k = (half) ? 0.5 : 1;
ctx.drawImage(movementIconImage, x, y, movementIcon.width * k, movementIcon.height);
}
}
export const drawFightIcon = (x: number, y: number, unit: Unit, half: boolean = false) => {
if(unit.isFighting) {
let k = (half) ? 0.5 : 1;
ctx.drawImage(fightIconImage, x, y, fightIcon.width * k, fightIcon.height);
}
}
export const drawArrowIcon = (x: number, y: number, half: boolean = false) => { |
typescript | constructor(private redis: typeof Redis, protected event: typeof Event) {}
public timeout = 5000
public clientId = v4()
private handlers: { [key: string]: (params: any) => Promise<any> | any } = {}
public server() {
this.redis.subscribe(`rpc:MAIN:request`, async (message: string) => {
const parsedMessage: RPCMessageRequest = JSON.parse(message)
serverDebug('parsedMessage', parsedMessage)
let result: any = null
let error = false |
typescript | expect(
getHeadings(
tokenize([
'## Level 2 (1)',
'#### Level 4 (1)',
'### Level 3 (1)',
'##### Level 5 (1)',
'#### Level 4 (2)',
]),
), |
typescript | import * as core from '@actions/core';
import * as github from '@actions/github';
async function run(): Promise<void> {
try {
const token = core.getInput('github-token', {required: true});
const daysUntilClose = parseInt(core.getInput('days-until-close', {required: true}));
const triggerLabel = core.getInput('trigger-label', {required: true});
const closingComment = core.getInput('closing-comment', {required: true}); |
typescript | mangaLists?: MediaListCollection;
userData?: UserType;
constructor(accessToken?: string);
fetch<T>(queryObj: QueryObject): Promise<T>;
fetchUser(): Promise<UserType>;
fetchUserAnimeList(): Promise<MediaListCollection>;
fetchUserMangaList(): Promise<MediaListCollection>; |
typescript |
export default createStore({
strict: true, // process.env.NODE_ENV !== 'production',
state: {
isSidebarMinimized: false,
userName: 'Operator'
},
mutations: {
updateSidebarCollapsedState(state, isSidebarMinimized) {
state.isSidebarMinimized = isSidebarMinimized
},
changeUserName(state, newUserName) {
state.userName = newUserName
} |
typescript | } catch (e) {
console.error(e);
}
return schema; |
typescript | {
name: 'Ramesh',
company: 'TCS',
experience : '2 years',
city: 'Delhi'
},
{
name: 'Suresh',
company: 'TCS',
experience : '6 years', |
typescript | import { withDB } from "../../../../lib/database";
export default withDB(async (req, res, db) => {
const { method } = req;
const { Site } = db;
switch (method) {
case "GET":
return Site.find({})
.then(siteData =>
res.status(200).json({ success: true, siteData: siteData[0] })
)
.then(() => res.end())
.catch(err => res.status(400).json({ success: false, err }));
|
typescript | export interface DownLine {
downLineDetails: CustomerDetails;
downLink: DownLink;
}
export interface Branch {
customerDetails: CustomerDetails; |
typescript | import { getFocusedRouteNameFromRoute } from '@react-navigation/native';
export function getHeaderTitle(route: any) {
const routeName = getFocusedRouteNameFromRoute(route) ?? 'Menu';
switch (routeName) {
case 'Menu': |
typescript | const ChatContainer = () => {
const {
chats,
dispatchChats,
activeChatIndex,
setActiveChatIndex,
} = useContext(SocketContext);
|
typescript | id: 'profile',
label: 'Profile',
},
{
id: 'billing',
label: 'Billing',
},
{
id: 'preferences',
label: 'Preferences',
},
{
id: 'sep1',
label: 'separator', |
typescript | export default `
type Voucher {
response: JSON!
}
`
|
typescript | "<NAME>",
"RICHMOND",
"BRONX",
"WESTCHESTER",
"PUTNAM",
"ROCKLAND",
"ORANGE",
"NASSAU",
"QUEENS",
"KINGS",
"ALBANY",
"SCHENECTADY",
"MONTGOMERY", |
typescript | import {ArbitrarySize, FluentPick} from './types'
import {Arbitrary} from './internal'
export const NoArbitrary: Arbitrary<never> = new class extends Arbitrary<never> {
pick(): FluentPick<never> | undefined { return undefined }
size(): ArbitrarySize { return {value: 0, type: 'exact', credibleInterval: [0, 0]} }
sampleWithBias(): FluentPick<never>[] { return [] }
sample(): FluentPick<never>[] { return [] }
map(_: (a: never) => any) { return NoArbitrary } |
typescript |
public static getInstance(proto: protoProcess, roomName: string) {
return new ProcessScout(roomName);
}
public run() { |
typescript | // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
export * from "./crate.ts";
|
typescript |
interface Props extends MaterialBase, Children {}
export default function Paragraph(props: Props) {
return (
<TextBase component="p" {...props}>
{props.children}
</TextBase>
);
}
Paragraph.propTypes = {
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node), |
typescript | imageWidth: 900,
isCollapsed: false,
onClose: Sb.action('onClose'),
onCollapse: Sb.action('onCollapse'),
publishTime: 1542241021655,
showImageOnSide: false, |
typescript | declarations: [ Account.ConnectionComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ConnectionComponent);
component = fixture.componentInstance;
fixture.detectChanges(); |
typescript | import * as router from './router';
process.argv.shift();
process.argv.shift();
router.cli(process.argv).subscribe((out) => {
if (out != '') {
console.log(out);
} |
typescript | * - contains a specific to React fix related to initial positioning when containers have components with managed focus
* to avoid focus jumps
*
* @param {PopperOptions} options
*/ |
typescript | this.DonhangServices.getKienHangDonHang(this.DonHang.MaDonHang).then(res => {
this.arrayKienHang = res;
})
}
tiepNhanDonHang(MaDonHang){
this.DonhangServices.ship_receive(MaDonHang).then(res => { |
typescript | import Util from '../Util';
it('deve retornar se é final de semana ou não', () => {
expect(Util.isWeekend(new Date(2020, 6, 26))).toBe(true);
});
it('testa se a pessoa é adulto', () => {
expect(Util.isAdult(new Date(1995, 10, 1), new Date(2020, 10, 1))).toBe(true);
expect(Util.isAdult(new Date(2015, 10, 1), new Date(2020, 10, 1))).toBe(false);
}); |
typescript | oldCount: 0,
newCount: 7,
refreshSource: 'mount',
},
});
setMockResponseCount(10);
simulatedClock.tick(20);
await asyncUpdateComponentTick(wrapper); |
typescript |
let fromVariable, toVariable;
const baseColors = __theme().baseColors();
Object.keys(baseColors).forEach(colorName => {
const colorObj = baseColors[colorName];
if (colorName === from && !fromVariable) {
fromVariable = colorObj.variable;
} else if (colorName === to && !toVariable) { |
typescript | expect(response).to.be.undefined
})
it("can find by complete bodies: timelog events", async () => {
await Promise.all(fixtureData.map(x => steps.canFind(x)))
})
it("can find entities by type", async () => {
const response = await storage.find({ type: 'timelog.timelog_event' })
expect(response).to.be.an('array')
expect(response).to.have.length(fixturesEvents.length)
response.forEach(entity => {
expectEntity(entity)
expect(entity.type).to.equal('timelog.timelog_event')
}) |
typescript | MaxLength,
Validate,
} from 'class-validator';
import { Constrains } from 'src/common/const/constraint';
import { ValidPassword } from 'src/common/validator/password.validator';
export class ResetPasswordDto {
@IsString()
@IsNotEmpty()
@IsJWT()
resetToken: string;
@IsString()
@IsNotEmpty()
@Validate(ValidPassword) |
typescript | <ResizeModalWrap
width={width + offset} height={0} handle={handle}
draggableOpts={{enableUserSelectHack: false}}
onResize={onResize}
onResizeStop={onResizeStop}
>
{node}
</ResizeModalWrap>
</Draggable> |
typescript |
constructor(){}
resolve(){
return Observable.create( (observer:any) => {
navigator.geolocation.getCurrentPosition(c => {
observer.next(c.coords);
observer.complete();
});
});
}
}
|
typescript | activeTab: string | null = null;
@property({type: Array})
tabs: EtoolsTab[] = [];
private _debouncer: Debouncer | null = null;
static get observers() {
return ['notifyTabsResize(tabs.*)'];
}
|
typescript | name: {
en: "Dratini",
},
illustrator: "<NAME>",
rarity: "Common",
category: "Pokemon",
set: Set,
dexId: [
147,
],
hp: 40, |
typescript | const fusionContext = useFusionContext();
const canQuery = (query: string) => !!query && query.length > 2;
const fetchPeople = useCallback(async (query: string) => {
if (canQuery(query)) {
setPeople([]);
try {
const response = await fusionContext.http.apiClients.people.searchPersons(query);
setPeople(response.data); |
typescript | height: number;
}
export interface SceneEdit_sceneEdit_details_PerformerEdit {
__typename: "PerformerEdit";
name: string | null;
disambiguation: string | null;
added_aliases: string[] | null;
removed_aliases: string[] | null; |
typescript | *
*/
interface Payload {
body: Cardano.TransactionBody;
inputAddress: { publicKey: Cardano.PublicKey; signature: string };
stakeAddress: { publicKey: Cardano.PublicKey; signature: string };
}
/**
*
*/
interface Response {
transaction: Cardano.Transaction;
bytes: string;
|
typescript | const Container = styled.div`
height: 100%;
color: ${({ theme }) => theme.colours.primaryNormalText};
background-color: ${({ theme }) => theme.colours.primaryBackground};
color: white;
display: flex;
flex-direction: column;
justify-content: center; |
typescript | export enum Routes {
SIGNUP_TO_OFFER_SHELTER = '/signup/offer-shelter',
SIGNUP_TO_REQUEST_SHELTER = '/signup/need-shelter',
}
|
typescript | class Header extends React.Component<ILayoutsProps, {}> {
constructor(props: ILayoutsProps) {
super(props);
this.state = {};
}
public render() {
const { layoutsStore } = this.props;
return (
<header className={styles.header}>
<div
className={styles.menu_trigger_container}
onClick={() => layoutsStore!.toggleMenu()} |
typescript | constructor(private cookieService: CookieService) { }
setOpeningState(data) {
this.cookieService.set(this.openingStateProperty, JSON.stringify(data));
}
setTabState(data) {
this.cookieService.set(this.tabStateProperty, JSON.stringify(data));
}
setFilteringState(data) {
this.cookieService.set(this.filteringStateProperty, JSON.stringify(data));
} |
typescript | export interface ProductRequestModel {
title: string;
category: String;
description: String;
condition: String;
pricePerDay: Number;
pictureIds: String[];
}
|
typescript |
expect.assertions(size);
for (let i = 0; i < size; i++) {
const uuid = generateUuid(); |
typescript | import { OrderDto } from './order.dto';
export class OrderWithDetailDto {
@Expose()
readonly order: OrderDto;
@Expose()
readonly detail: DetailDto | null;
} |
typescript |
export type DocumentUpdateMessage = {
type: 'update';
documentUri: string;
text: string;
state: SaveState | null;
};
export type SaveStateMessage = {
type: 'save-state';
state: SaveState;
}; |
typescript | export * from './column-filter-dialog';
|
typescript |
const openView = (name: string, outlet?: string, options?: object): void => {
if (isViewExistsInState(viewsState, name)) {
dispatch({ type: OPEN_VIEW, payload: { name, outlet, options } });
}
};
const closeView = (name: string, dispatchBeforeCloseAction = true): void => {
if (isViewExistsInState(viewsState, name)) {
if (dispatchBeforeCloseAction) {
dispatch({ type: BEFORE_CLOSE_VIEW, payload: { name } });
} else {
dispatch({ type: CLOSE_VIEW, payload: { name } });
}
} |
typescript |
const utils = {
fileExists: existsSync,
getArgv: () => ipcRenderer.invoke("argv") as Promise<string[]>,
toggleDevTools: () => {
ipcRenderer.invoke("devtool-toggle");
},
startPowerSaveBlocker: () => {
ipcRenderer.invoke("powersaveblocker-start");
},
stopPowerSaveBlocker: () => {
ipcRenderer.invoke("powersaveblocker-stop");
}, |
typescript | * @apiName biz.realm.unsubscribe
*/
export interface IBizRealmUnsubscribeResult {
}
/**
* 取消订阅专属sdk事件
* @apiName biz.realm.unsubscribe
* @supportVersion ios: 4.7.18 android: 4.7.18
* @author Android :笔歌; IOS: 怒龙
*/
export declare function unsubscribe$(params: IBizRealmUnsubscribeParams): Promise<IBizRealmUnsubscribeResult>;
export default unsubscribe$;
|
typescript | export const icons = {
back: require("./arrow-left.png"),
bullet: require("./bullet.png"),
nineDots: require("./nine-dots.png"),
circleMore: require("./circle-more-detail.png"),
}
|
typescript | " " +
device +
" (" +
os_version +
")"
);
/* istanbul ignore if */
if (!compatibilityCheck) { |
typescript | direction: Direction;
initialContexts(location: GraphNode<Node>): TContext[];
bottom: TEnvironment;
isEntry?(location: GraphNode<Node>): boolean;
entry(location: GraphNode<Node>): TEnvironment;
join(a: TEnvironment, b: TEnvironment): TEnvironment;
equal(a: TEnvironment, b: TEnvironment): boolean;
kinds: GraphNodeKind[];
filter(node: Node): node is TNode; |
typescript |
public componentWillReceiveProps(newProps: IProps) {
if (newProps.imageUrl != this.props.imageUrl && newProps.imageUrl) {
this.setState({ loaded: false });
this.image.src = newProps.imageUrl;
}
}
public componentWillUnmount() {
if (this.image) {
this.image.removeEventListener("load", this.imageLoadedFunc);
}
}
|
typescript | import { XtermComponent } from './components/xterm.component';
import { NgModule } from '@angular/core';
@NgModule({
declarations: [
XtermComponent,
],
exports: [
XtermComponent,
],
imports: [],
providers: [],
})
export class XtermModule {
} |
typescript | /**
* The idle timeout in minutes which is used for the NAT Gateway.
*/
readonly idleTimeoutInMinutes: number;
/**
* The location where the NAT Gateway exists.
*/
readonly location: string;
readonly name: string;
/**
* A list of existing Public IP Address resource IDs which the NAT Gateway is using.
*/
readonly publicIpAddressIds: string[];
/**
* A list of existing Public IP Prefix resource IDs which the NAT Gateway is using. |
typescript | TestBed.configureTestingModule({
providers: [
{ provide: BooksService, useValue: {} }
]
});
resolver = TestBed.inject(BookListResolver);
});
it('should be created', () => { |
typescript |
/**
* Esse arquivo é apenas um wrapper do
* componente principal na pasta src
*/
export default App; |
typescript |
export interface RegionContent {
Active: Region[];
en: any;
fr: any;
}
export interface RegionContentResponse {
status: 400 | 304 | 200;
payload: RegionContent | null;
}
|
typescript | {
path: 'album/:id', component: CustomAlbumComponent,
},
{
path: 'contact', component: ContactComponent,
},
{ |
typescript | import { _UsageRecordList } from "./_UsageRecordList";
import { Structure as _Structure_ } from "@aws-sdk/types";
export const BatchMeterUsageInput: _Structure_ = {
type: "structure",
required: ["UsageRecords", "ProductCode"],
members: {
UsageRecords: {
shape: _UsageRecordList
},
ProductCode: { |
typescript |
const toggleColorMode = (): void => {
setColorMode(colorMode === 'light' ? 'dark' : 'light')
}
return (
<StyledProvider theme={getTheme(colorMode)}>
<Provider
value={{
colorMode,
setColorMode: toggleColorMode,
}}
> |
typescript | import { SvgIcon, SvgIconProps } from '@kukui/ui';
const SvgComponent = props => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}>
<path d="M448 0H64C28.75 0 0 28.75 0 63.1v287.1c0 35.25 28.75 63.1 64 63.1h96v83.1c0 9.75 11.25 15.45 19.12 9.7l124.88-91h144c35.25 0 64-28.75 64-63.1V63.1C512 28.75 483.3 0 448 0zm-97.4 224.1c-4.7 5.6-10.8 7.9-16.9 7.9a24 24 0 0 1-16.97-7.031l-39.03-39.03V288c0 13.25-10.75 24-24 24s-24-10.75-24-24V185.9l-39.1 38.2c-9.375 9.375-24.56 9.375-33.94 0s-9.375-24.56 0-33.94l80-80c9.375-9.375 24.56-9.375 33.94 0l80 80c8.5 10.24 8.5 25.44 0 33.94z" />
</svg>
);
|
typescript | */
buildFile: string;
/**
* the graph object
*/
graph: Graph;
/**
* an instance of a logger
*/
logger: Logger;
/**
* The absolute or relative path to the project directory.
* If undefined, defaults to working directory. |
typescript | * Created by Vidailhet on 20/12/16.
*/
export interface ITestAppEnvConfiguration {
name: string,
optionalParam?: string,
} |
typescript | @Output() deleteThis = new EventEmitter<boolean>();
deleteMe(deleteNow:boolean){
this.deleteThis.emit(deleteNow);
}
AddLike(){
this.quote.upvotes++;
}
AddDislike(){
this.quote.downvotes++;
}
constructor() { } |
typescript | import { MfaActionRequired } from '../../mfa/types/mfa-action-required.types';
export interface UserRegisterResponse
{
userSessionId: string;
mfaActionRequired: MfaActionRequired;
} |
typescript | import {
usePickerBase,
PickerBaseHTMLProps,
PickerBaseOptions,
} from "../picker-base";
import { TIME_PICKER_KEYS } from "./__keys";
export type TimePickerOptions = PickerBaseOptions; |
typescript | async getAllBooks() {
return new Promise((res) => {
setTimeout(() => {
res({
books: this.books, |
typescript | import { Categories } from 'src/books/models/categoties.model';
import { ConfigModule } from '@nestjs/config';
@Module({
imports:[
forwardRef(()=> UsersModule),
ConfigModule.forRoot({
envFilePath: '.env'
}),
PassportModule,
JwtModule.register({
secret: process.env.SECRET |
typescript |
export type CardHeaderClassKey = 'root' | 'avatar' | 'action' | 'content' | 'title' | 'subheader';
export const CardHeaderKey = 'CardHeader';
export default interface CardHeaderVisual extends Visual<CardHeader> {
type: typeof CardHeaderKey; |
typescript | /**
* Suspends execution for a certain amount of time (in seconds)
* @param time - A non-negative decimal integer specifying the number of seconds for which to suspend execution.
*/
export async function sleep(time: number): Promise<void> {
await delay(time * 1000);
} |
typescript | <button class="mdc-button mdc-ripple-upgraded" disabled>
<span class="mdc-button__label"></span>
</button>
`);
});
it('renders with a leading icon', async () => {
element.setProperty('disabled', false);
element.setProperty('icon', 'event');
await page.waitForChanges();
expect(button).toEqualHtml(`
<button class="mdc-button mdc-ripple-upgraded">
<i class="material-icons mdc-button__icon">event</i> |
typescript | import { ofValues as ofValuesStatic } from '../../iterable/ofvalues';
declare module '../../iterable' {
namespace IterableX {
let ofValues: typeof ofValuesStatic;
}
}
|
typescript | fileReceivingApplication: String,
fileReceivingFacility: String,
fileCreationDateTime: String,
fileSecurity: String,
fileNameId: String,
fileHeaderComment: String, |
typescript | <Svg
id="Raw"
viewBox="0 0 256 256"
width={props.size}
height={props.size}
fill={props.color}
{...props}
>
<Rect width={256} height={256} fill="none" />
<Path d="M48,223.99414H208a16.01582,16.01582,0,0,0,16-16v-160a16.01583,16.01583,0,0,0-16-16H48a16.01583,16.01583,0,0,0-16,16v160A16.01582,16.01582,0,0,0,48,223.99414Zm80.40625-56.39062a7.99708,7.99708,0,0,1,0-11.3125l20.28613-20.29688H88a8,8,0,0,1,0-16h60.6875L128.40625,99.71289a7.99915,7.99915,0,0,1,11.3125-11.3125l33.92773,33.92773a8.02367,8.02367,0,0,1,0,11.332l-33.92773,33.94336A7.99708,7.99708,0,0,1,128.40625,167.60352Z" />
</Svg> |
typescript | }
export interface NotificationTextInput {
buttonTitle: string;
placeholder: string;
}
export declare class NotificationAction {
identifier: string;
activationMode: 'background' | 'foreground' | 'authenticationRequired' | 'destructive';
title: string;
authenticationRequired: boolean;
textInput?: NotificationTextInput;
constructor(identifier: string, activationMode: 'foreground' | 'authenticationRequired' | 'destructive', title: string, authenticationRequired: boolean, textInput?: NotificationTextInput);
} |
typescript | <gh_stars>0
export declare const cidHeadphonesMic: string[]; |
typescript | import { DataPage } from 'pip-services3-commons-nodex';
import { IdentifiableMySqlPersistence } from '../../src/persistence/IdentifiableMySqlPersistence';
import { Dummy2 } from '../fixtures/Dummy2';
import { IDummy2Persistence } from '../fixtures/IDummy2Persistence';
export declare class Dummy2MySqlPersistence extends IdentifiableMySqlPersistence<Dummy2, number> implements IDummy2Persistence {
constructor();
protected defineSchema(): void; |
typescript | auth: {
user: testAccount.user,
pass: <PASSWORD>,
},
});
const info = await transporter.sendMail({
from: `"<NAME> 👻" <${testAccount.user}>`,
to: mailOptions.to,
subject: "Verification Code - Tidify",
text: "Hello world?",
html: `This is your Code: ${code}`,
}); |
typescript | greaterThanOrEqualsTo(other: MixedNumber): boolean {
return this.value.isGreaterThanOrEqualTo(DSNumber.valueOf(other).value);
}
plus(other: MixedNumber): DSNumber {
return new DSNumber(this.value.plus(DSNumber.valueOf(other).value));
} |
typescript | <button (click)="editButtonHasBeenClicked(currentAnimal)">Edit!</button>
</li>
</ul>
`
}) |
typescript |
return registerLogEvent(runId, {message, payload, time, type}).then((numberInRun) => {
// eslint-disable-next-line sort-keys
const printedString = valueToString(context ? {payload, context} : {payload});
// eslint-disable-next-line no-console
console.log(`[e2ed][${dateTimeInISO}][${runLabel}][${runId}] ${message} ${printedString}\n`);
const pageLoaded = getPageLoaded();
if (pageLoaded && (type === LogEventType.Action || type === LogEventType.InternalAssert)) {
return testController.takeScreenshot({path: `${runId}/${numberInRun}`}) as Promise<void>; |
typescript | const QUESTION_ACTIONS_FRAGMENT = graphql`
fragment QuestionActionsFragment on EventQuestion {
id
...QuoteFragment
...LikeFragment
...QueueButtonFragment
...DeleteButtonFragment
}
`; |
typescript |
constructor(elementId: string, navigationElementId: string) {
super(elementId, '/project/', 'list');
this._navigationViewModel = new NavigationViewModel(navigationElementId);
}
}
} |
typescript | export * from './lib/sentry.module';
export * from './lib/sentry.service';
export * from './lib/tokens';
|
typescript | return false;
}
export function useFocusOnFirstFocusable(container: MutableRefObject<HTMLElement | null>) {
const element = container.current;
useJustOnceEffect(
done => {
const focused = focusOnFirstFocusable(container.current);
if (focused) { |
typescript | "name": "color",
"type": "Enum",
"example_values": [
"'dark-purple'"
],
"comment": "Color of the tag. Must be either `null` or one of: `dark-pink`,\n`dark-green`, `dark-blue`, `dark-red`, `dark-teal`, `dark-brown`,\n`dark-orange`, `dark-purple`, `dark-warm-gray`, `light-pink`, `light-green`,\n`light-blue`, `light-red`, `light-teal`, `light-yellow`, `light-orange`,\n`light-purple`, `light-warm-gray`.\n"
},
{
"name": "workspace",
"type": "Workspace",
"example_values": [
"{ id: 14916, gid: \"14916\", name: 'My Workspace' }"
],
"comment": "The workspace or organization this tag is associated with. Once created,\ntags cannot be moved to a different workspace. This attribute can only\nbe specified at creation time.\n" |
typescript | /** @protected */
protected _evaluate(meta: IJtIfMeta, a: number, b: number, data?: any): string
{
let raw = meta.lval;
a = raw.indexOf('(', a) + 1; // if -> ( ...
const edheader = ')' + meta.hcfg.ed;
const posheader = raw.indexOf(edheader, a);
const condition = meta.act.bind |
typescript | setId: (id: number) => number;
getId: () => number;
getKey: () => string;
}
const subscriber: Subscriber = (key: string) => {
let _id = 0;
const _key = key;
return {
setId: (id: number) => _id = id,
getId: () => _id, |
typescript |
export abstract class BasePlugin<T extends TemplateBase> {
abstract name: string
/**
* Higher priority plugins should be executed first
*/
priority = 0
dependencies: BasePlugin<T>[] = [] |
typescript | }
if (counter === 6) {
glassCrunchHandler();
}
if (counter === 7) {
glassCrushHandler();
}
if (counter === 8) {
glassShattersHandler();
}
if (counter === 9) {
explosionDistantHandler(); |
typescript | // console.log(map3.toString());
// console.log("====stringiterator====");
// let iterator = new AMS.StringIterator("Hello,world!!\nthis is a pen");
// while (iterator.hasNext()) {
// console.log(iterator.readBeforeChar(",!"));
// }
// console.log("====readbeforecharwithnest====");
// let iterator = new AMS.StringIterator(
// `AAA;BBB;CCC{XXX{PPP};YYY};/DDD{10};/DDD`
// );
// while (iterator.hasNext()) {
// console.log(iterator.readBeforeCharWithNest(";", "{}")); |
typescript | context.poll();
return (): void => {
context.stopPoll();
};
}, [context]);
return context;
}
export function useWeb3Injected(options?: Web3ContextOptions): Web3Context | undefined {
const [provider] = useState((): Provider | undefined => providers.tryInjected());
if (!provider) return undefined;
return useWeb3Context(provider, options); |
typescript |
static FromBaseItem(baseItem: RPG.Item)
{
let newSettings = new this();
newSettings.SetFromBaseItem(baseItem);
return newSettings;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.