lang stringclasses 10
values | seed stringlengths 5 2.12k |
|---|---|
typescript | <path d="M15.964.686a.5.5 0 0 0-.65-.65L.767 5.855a.75.75 0 0 0-.124 1.329l4.995 3.178 1.531 2.406a.5.5 0 0 0 .844-.536L6.637 10.07l7.494-7.494-1.895 4.738a.5.5 0 1 0 .928.372l2.8-7Zm-2.54 1.183L5.93 9.363 1.591 6.602l11.833-4.733Z" />
<path d="M16 12.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Zm-3.5-2a.5.5 0 0 0... |
typescript | export { default } from './DownloadButtons';
|
typescript | });
test('parseLiteral', () => {
expect(
GraphQLEmailAddress.parseLiteral(
{
value: 'test@test',
kind: Kind.STRING,
},
{},
),
).toBe('test@test');
}); |
typescript | ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CafeAngularClientComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
const service = getTestBed().get... |
typescript | * @author Surmon <https://github.com/surmon-china>
*/
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({ name: 'dataToLocale' })
export class DataToLocalePipe implements PipeTransform {
transform(input: any): string {
const date = new Date(input); |
typescript | import { Observable } from 'rxjs';
import { ChatMessageData, PowParams, PowSolution } from './types';
export interface ChatClientI {
readonly messages: Observable<ChatMessageData>;
readonly authenticated: Observable<boolean>;
readonly ready: Observable<boolean>;
readonly connected: Observable<boolean>;
reado... |
typescript | answerBox.remove();
}
});
};
|
typescript | export enum Errors {
IMAGE_FILE_REQUIRED = 'IMAGE_FILE_REQUIRED',
METADATA_EXISTS = 'METADATA_EXISTS',
WRONG_SYMBOL = 'WRONG_SYMBOL',
WRONG_VALUE = 'WRONG_VALUE',
CAN_NOT_GET_NEXT_TOKEN_IDENTIFIER = 'CAN_NOT_GET_NEXT_TOKEN_IDENTIFIER',
TOKEN_METADATA_DOES_NOT_CREATED = 'TOKEN_METADATA_DOES_NOT_C... |
typescript | businessInfo,
}: PageProviderComposerProps) => (
<BusinessInfoProvider businessInfo={businessInfo}>
<LocaleProvider locale={locale}>
<ThemeProvider theme={theme}>
<HeadProvider>{children}</HeadProvider>
</ThemeProvider>
</LocaleProvider>
</BusinessInfoProvider> |
typescript |
export function _curry(fn: (...args: any[]) => any) {
return (...args: any[]) => {
if (fn.length > args.length) {
return (...nextArgs: any[]) => (curry(fn) as any)(...args, ...nextArgs);
}
return fn(...args);
};
}
export interface Curry2<P1, P2, R> { |
typescript |
componentDidMount() {
NProgress.done()
}
|
typescript | res.json(e);
}
} else {
res.status(400);
res.json('please provide valid property id'); |
typescript | Logger.error = function (message?: any, ...args: any[]): void {
if (window.console) {
console.error.apply(console, [message, args]);
}
};
export default Logger;
|
typescript | function SvgVitaminCSerumGlyph(props: SVGProps<SVGSVGElement>) {
return (
<svg
width={48}
height={48}
viewBox="0 0 48 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M28.035 20.547c-.828-.68-.932-1.362-.932-1.945h1.242v-4.766h-2.173v-3... |
typescript |
export interface IconsType {
firstIcon: DynamicValue<WebIcon>;
secondIcon: DynamicValue<WebIcon>;
}
export interface IconsPreviewType {
firstIcon: { type: "glyph"; iconClass: string; } | { type: "image"; imageUrl: string; } | null;
secondIcon: { type: "glyph"; iconClass: string; } | { type: "image"; i... |
typescript | });
SC.get('/users/'+window.user_id+'/playlists').then(function(playlists) {
console.log(playlists);
});
SC.oEmbed("https://soundcloud.com/lody-saint-germain/sets/chill", { auto_play: false }).then(function(oEmbed) {
console.log('oEmbed response: ', oEmbed);
$(".zouk.channel").... |
typescript |
this.compare();
this.resetForm(this.NgForm);
this.fill();
if (this.service.subsVar==undefined) {
this.service.subsVar = this.service. |
typescript | isCurrentRoute() {
var newRoute = this.router.url;
if(newRoute[0] === '/') {
newRoute = newRoute.substring(1);
}
if(this.route === newRoute) {
return true;
} else { |
typescript | export async function getStaticProps(context) {
// default empty slug so that it doesn't return "undefined"
const {slug = ''} = context.params
const post = await client.fetch(query, {slug})
return {
props: {
post,
},
} |
typescript |
export interface DaffModal {
/**
* The reference to the modal in question
*/
modal: ComponentRef<DaffModalComponent>; |
typescript | import { Network } from "ferrum-plumbing";
import { Connect } from "../contract/Connect";
import { TokenContractFactory } from "../contract/Contract";
import { CustomTransactionCallRequest, CustomTransactionCallResponse, SendMoneyResponse, UnifyreExtensionKitClient } from "unifyre-extension-sdk";
import { AppLinkReques... |
typescript | const tooltip = `Click to ${open ? 'collapse' : 'expand'}`;
return (
<div>
<div onClick={() => toggleOpen(!open)} className={headerStyle} title={tooltip}>
{label}
<Icon name={open ? 'angle-down' : 'angle-right'} size="xl" className={styles.icon} />
</div>
{open && <div classNa... |
typescript | }
}
// Generated from src/test/java/com/google/javascript/clutz/testdata/double_inner_class.js
declare namespace ಠ_ಠ.clutz.module$exports$iterated$innerclass {
class B {
private noStructuralTyping_module$exports$iterated$innerclass_B : any;
}
}
// Generated from src/test/java/com/google/javascript/clutz/testd... |
typescript | export class Settings {
apiUrl: string;
} |
typescript | import SpotbugsReport, { SpotbugsBug } from "./types";
export default class SpotbugsParser extends ReportParser<SpotbugsReport> {
private category = "";
private bug: SpotbugsBug = {
filePath: "",
startLine: 0,
endLine: 0,
category: "",
priority: 0, |
typescript | // Directives
import './angularjs/SaveDashboardAsModalCtrl';
import './angularjs/SaveDashboardModalCtrl';
import './angularjs/SettingsCtrl';
|
typescript | status: true,
message: `Lista cargada correctamente`,
hasMore: result.has_more,
customers: result.data
};
}).catch( (error: Error) => {
return {
status: false,
... |
typescript | import { NgModule } from "@angular/core";
import { IonicPageModule } from "ionic-angular";
import { FilmsPage } from "./films";
@NgModule({ |
typescript | export type PluginConfigItem = {
/** plugin unique ID */
name: string
enable?: boolean
/** npm module name */ |
typescript | name: 'Magneta'
},
{
id: 16,
name: 'RubberMan'
},
{
id: 17, |
typescript | this.visualizacao()
}
incluirParecerChange() {
if (this.form.get('pendenteParecer').value == 'S') {
this.buscaUsuariosFinalizador()
this.form.get('usuarios').setValidators(Validators.required)
} else {
this.form.get('usuarios').setValidators(null)
}
this.form.get('usuarios').u... |
typescript | import { BrowserRouter as Router } from 'react-router-dom';
import { render } from '@testing-library/react';
import NAME from './';
import styles from './NAME.module.scss';
test('renders without crashing', () => {
const { baseElement } = render(
<Router>
<NAME PROPS_USE />
</Router>
);
expect(baseElement).t... |
typescript | `;
const CardHeader = styled.div`
border-top-left-radius: 7px;
border-top-right-radius: 7px;
background-color: ${ theme ? "#d1d2d433" : "#000000" };
transition: 0.5s;
height: 3rem;
box-shadow: ${ theme ? "none" : "0px 11px 10px -7px #15151570" };
`;
const GitLogo = styled( ScGithub )`
... |
typescript | const authorCap = authorName.charAt(0).toUpperCase() + authorName.slice(1);
if (message.chatCreated) {
return `${authorCap} created the chat`;
} else if (message.chatEdited) {
return `${authorCap} edited the chat`;
} else if (message.userInvited) {
return `${authorCap} invited ${targetName}`;
} el... |
typescript | const onLoginPage = this.locationIsLoginPage(location);
// Unauthorized
if (xhr.status === 401 && !onLoginPage && !onAccessDeniedPage) {
document.cookie = CookieUtils.emptyCookieWithExpiry(new Date(1970));
window.location.href = "#/login";
}
// TODO: foundation refactor n... |
typescript | export * from './members';
export * from './reducers';
export * from './sagas';
|
typescript | public async createSession(userEmail: string, userId: number) {
return await this.createAndSave({ email: userEmail, userId })
}
public async updateSession(sessionId: number, data: Partial<Session>) {
return await this.updateOne(sessionId, data)
} |
typescript | export class ListDirectoriesCommand
implements
__aws_sdk_types.Command<
InputTypesUnion,
ListDirectoriesInput,
OutputTypesUnion,
ListDirectoriesOutput, |
typescript | */
export const containsStringValues = (matrix: Array<any[]>) => {
const result = matrix.map(row => row.every((e: any) => typeof e === 'string'));
return result.includes(true);
};
/**
* Checks if the matrix is a square one |
typescript | export const RequestStashDropDialog: React.FC = () => {
const dialog = useDialog();
return dialog.type === 'request-stash-drop' ? (
<Modal isOpen={true}>
<StyledDialog>
<div>Delete stash "{dialog.stash.message}" from the repository?</div>
<ButtonGrou... |
typescript | accidentType: { radioButton: AccidentTypeEnum.WORK },
}
const someOtherAccident: FormValue = {
workAccident: { type: WorkAccidentTypeEnum.FISHERMAN },
}
const emptyObject = {}
|
typescript | public urls: string[] = [];
public stdin?: boolean;
public out?: string;
public prefix?: string;
public header?: string;
public target: TargetVersion = 'v2';
public isReadFromStdin(): boolean {
return this.stdin || this.files.length === 0 && this.urls.length === 0;
} |
typescript | const { id, product_id, variant_id, name, image_url, quantity } = item;
const { removeFromCart } = useCartAction();
const { price } = usePrice({
amount: item.extended_sale_price,
baseAmount: item.extended_list_price,
currencyCode,
});
return (
<div className="flex justify-between mt-6"> |
typescript | }
if (typeof obj[key] === 'object') {
obj[key] = renameKeys(keysMap, obj[key])
}
return {
...acc,
...renamedObject,
}
}, {})
} |
typescript | }
interface ActiveTabsMapAction {
type: 'SET' | 'UNSET',
payload: ActiveSectionTabProps,
}
|
typescript | TestDirectiveDirective,
SamplePipePipe
],
imports: [
BrowserModule,
AppRoutingModule |
typescript | link: "/settings",
icon:'settings'
},
{
name: "Info",
link: "/info", |
typescript | 'paxosstandard-pax',
'tether-usdt',
'usdcoin-usdc',
'vechain-ven',
'zrx-zrx',
]);
});
it("will raise exception for non-existent release", async () => {
try {
await ensRegistry.registries.package('ens').release('100');
} catch (error) {
expect(error).toBeInstanc... |
typescript |
@Module({
imports: [TypeOrmModule.forFeature([Analysis])],
providers: [AwsService, UserVideoS3Service, UserImageS3Service],
controllers: [AwsController],
exports: [AwsService, UserVideoS3Service, UserImageS3Service],
})
export class AwsModule {}
|
typescript | export interface INewCheerEventArg extends IBaseEventArg {
cheerer: ICheer;
streamDate: string;
}
|
typescript | const { filters } = context.setting;
const { tagDescription } = context.data;
const onClick = () => {
console.log(filters);
if (value && !filters.includes(value)) {
context.setState((context) => ({
...context, |
typescript | [name: string]: any;
}
intersectOptions: object;
}
export const imageModule: Module<ModuleOptions>
|
typescript | const ilogger = new OCSDKLogger(logger);
return new SDK({
channelId: omnichannelConfiguration.channelId || Constants.defaultChannelId,
orgId: omnichannelConfiguration.orgId,
orgUrl: omnichannelConfiguration.orgUrl,
widgetId: omnichannelConfiguration.widgetId
},
config... |
typescript | const accountOne = accounts[0];
const accountTwo = accounts[1];
// Get initial balances of first and second account.
const accountOneStartingBalance = (await instance.balanceOf(accountOne));
const accountTwoStartingBalance = (await instance.balanceOf(accountTwo));
// Make transaction from firs... |
typescript | describe('getBillingAddress', () => {
it('returns billingAddress state', () => {
expect(getBillingAddress(initialState)).toEqual(initialState.billingAddress);
});
});
describe('getBillingAddressIsShippingAddress', () => {
it('returns billingAddressIsShippingAddress state', () => {
... |
typescript | * @param confirmString
*/
export async function reset(confirmString: string): Promise<string> {
const rdb = await connection();
await rdb.reset(confirmString);
return 'reset success'; |
typescript |
export class EpsilonTypographyPreviewer {
/**
* Constructor
*/
public constructor() {
const self = this;
wp.customize.preview.bind( 'update-inline-typography-css', |
typescript | const float = useTypedSelector((state) => state.float);
return float ? (
<StyledFloat
style={{
left: float.x,
top: float.y - VERTICAL_OFFSET,
}}
>
{float.content} |
typescript | readonly line: number;
constructor(offset: number, line: number, column: number) {
this.offset = offset;
this.line = line;
this.column = column;
} |
typescript | kind: "step";
next: () => DebuggerStream;
}) & {
show: () => DebuggerStreamStep;
};
export declare let run_stream_to_end: (s: DebuggerStream) => Immutable.List<DebuggerStreamStep>;
export declare let get_stream: (source: string, custom_alert: Sum<(_: string) => boolean, Unit>) => DebuggerStream; |
typescript | });
}
updateBook(): void {
this.booksService.updateUser2(this.currentBook.id, this.currentBook)
.subscribe( |
typescript |
window.parent.postMessage(JSON.stringify({
type: applicationMessageName,
status: STATUS.SUCCEED,
token,
}), '*');
|
typescript | <gh_stars>0
import { Module } from '@nestjs/common';
import { ReversoApiService } from './reverso-api.service';
@Module({
providers: [ReversoApiService],
exports: [ReversoApiService]
})
export class ReversoApiModule { }
|
typescript | function verifyInput(inputFilename): boolean {
// validate the input filename
if (inputFilename.toLowerCase().indexOf('ncc.html') != inputFilename.length - 8) {
throw new Error(`Input must be an NCC file. Got "${inputFilename}" instead.`);
}
if (!fs.existsSync(inputFilename)) {
throw new... |
typescript | protected bindContract: CementoBindContract;
protected providerType: CementoProviderType;
abstract getProviderType(): CementoProviderType;
protected buildDynamicStubs(): void;
protected setBindContract(bindContract: CementoBindContract): void; |
typescript | //1
export interface IAuthState {
auth: {
user: IUser,
loginSuccess: boolean,
registerSuccess: boolean,
}
} |
typescript | return res.once(
req.url.searchParams.get('domain') === 'foo.bar'
? ctx.json(BREACHES)
: ctx.status(418),
);
}),
);
return expect(breaches({ domain: 'foo.bar' })).resolves.toEqual(BREACHES);
});
});
}); |
typescript | position: absolute;
top: ${(props: CurrentHourProps) => `${props.percent * 1847}px`};
`;
interface DayViewProps {
time: Moment;
compact?: boolean;
separators?: boolean;
hideHourLine?: boolean;
onTimeSelect: (startTime: Moment) => void;
}
interface DayViewState { |
typescript | url: string;
host: string;
hostname: string;
href: string;
port: string;
pathname: string;
search: string;
hash: string;
html: string; |
typescript | export const MULTER_DEV_DEPENDENCIES = {
'@types/multer': '^1.4.7',
};
export const PRETTIER_DEV_DEPENDENCIES = {
'eslint-config-prettier': '^8.5.0',
'eslint-plugin-prettier': '^4.0.0',
prettier: '^2.6.2',
};
export const QUERY_STRING_DEV_DEPENDENCIES = {
'@types/query-string': '^6.3.0',
};
export const RE... |
typescript | <gh_stars>0
import { I18nPage, includeDefaultNamespaces } from "../../i18n";
import { AppLayout } from "../../layout";
export const MyHistory:I18nPage=()=>{
return <AppLayout showSide={true}>
</AppLayout>
}
MyHistory.getInitialProps=async ()=>{ |
typescript | cb: (err: Error, dockerContainer: DockerContainer)=>void);
listContainers(listAllContainers: boolean,
cb: (err: Error, dockerContainers?: DockerContainer[])=>void);
createContainer(dockerContainerConfig: any,
cb: (err: Error, dockerContainer: DockerContainer)=>void)... |
typescript | // bread crumbs
const jsonBreadCrumbs = {
'@context': 'http://schema.org',
'@type': 'BreadcrumbList',
'itemListElement': [
{
'@type': 'ListItem',
'position': 1, |
typescript | (cardNumber: string): CreditCardTypeInfo[];
getTypeInfo(type: string): CreditCardTypeInfo;
updateCard(type: string, updates: Partial<CreditCardTypeInfo>): void;
}
export const creditCardType: CreditCardType;
}
|
typescript | this.flush();
return this.$bridge.call(id, method, parameters);
}
flush(): void {
tabris.trigger('layout');
const operations = this.$operations;
this.$operations = [];
this.$currentOperation = {id: undefined};
const length = operations.length;
if (!length) {
return;
} |
typescript | ],
exports: [
CovalentSideSheetActionsDirective,
CovalentSideSheetCloseDirective,
CovalentSideSheetContentDirective,
CovalentSideSheetTitleDirective,
CovalentSideSheetWrapperDirective,
], |
typescript | styleUrls: ['./summarise-writte-text-list.component.scss']
})
export class SummariseWritteTextListComponent implements OnInit {
requestedURLs=new ApiURL();
constructor() { }
ngOnInit() {
this.requestedURLs.apiURL='api/WritingSummariseWrittenText';
this.requestedURLs.backURL='admin/'+"summarise-writte-... |
typescript | touchable?: ReactElement;
}
export const Card: VisageComponent<
CardProps & ExtractVisageComponentProps<typeof CardBase>
> = forwardRef( |
typescript |
import { PWRootModule } from '../app/pw-root/pw-root.module';
@NgModule({
imports: [
PWRootModule,
ServerModule
],
bootstrap: [PWRootComponent],
})
export class PWRootServerModule { }
|
typescript | constructor(@inject(UserRepositoryImpl) $userRepository: UserRepository) {
super();
this.userRepository = $userRepository;
}
protected generateUseCase(input?: null | undefined): Promise<boolean> {
return this.userRepository.checkForAdmin(); |
typescript | <Label>Lineage</Label>
<td>
{data.lineage_ids
.map((id, i) =>
<span key={id}> |
typescript | import { getCheckNewMsgs } from '../get'
export async function checkMessageDecryption(
t: Assertions,
node: NodeConfig,
msgUuid,
text
) {
// //wait for message to process
const lastMessage = await getCheckNewMsgs(t, node, msgUuid)
t.truthy(lastMessage, 'await message post')
|
typescript | return diffLog
} catch (err) {
this.notifyUser({
type: 'error',
message: err,
action1: { label: this.$t('OK') }
})
return null
} finally { |
typescript | PipesModule
],
exports: [ModuleListComponent
],
entryComponents: [
AddModuleDialogComponent, |
typescript | }
public updateRequest(url: string, requestBody: any, eTag: string, endPoint?: string): ng.IPromise<{}> {
const deferred: ng.IDeferred<any> = this.$q.defer();
this.getFormDigestValue(this.baseUrl)
.then((requestDigest: string): ng.IPromise<ng.IHttpPromiseCallbackArg<any>> => {
return this.$ht... |
typescript | { $limit: 1 },
...ventasYVendedor,
])
.toArray()
.then((arr) => arr[0]) |
typescript | kindOfQuantity: "TestSchema.TestBaseKoQ",
};
const childPropJson = {
name: "TestProperty",
type: "PrimitiveProperty",
kindOfQuantity: "TestSchema.TestKoQ",
};
|
typescript | import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { PersonRepository } from 'src/Person/Person.repository';
import { DeleteResult, UpdateResult } from 'typeorm';
import { CreateMovieDto } from './Movie.dto'; |
typescript | r.table("users").insert({
name: "John",
subscription_date: r.now()
}).run(conn, callback);
// http://rethinkdb.com/api/javascript/time/
r.table("user").get("John").update({ birthdate: r.time(1986, 11, 3, 'Z') }).run(conn, callback);
// http://rethinkdb.com/api/javascript/epoch_time/
r.table("user").get("John"... |
typescript | import {NamedTestStructure} from "./NamedTestStructure";
import {TypeParameteredTestStructure} from "./TypeParameteredTestStructure";
import {ParameteredTestStructure} from "./ParameteredTestStructure";
import {ReturnTypedTestStructure} from "./ReturnTypedTestStructure";
import {OverloadSignaturedTestStructure} from ".... |
typescript | width="20"
className={this.getClassName()}
aria-hidden="true"
tabIndex={-1}
focusable="false"
>
<path fill="#949494" d="M19 1L7 3v11.754A4.269 4.269 0 0 0 4.5 14C2.567 14 1 15.12 1 16.5S2.567 19 4.5 19 8 17.88 8 16.5V4l10-1.7.002 10.455A4.267 4.267 0 0 0 15.5 12c-1.... |
typescript |
// new
attributes: MatchedAttributesDVO[];
attributeCount: number;
}
export interface AuthorizationGrantRequestDVO extends RequestDVO {
type: "AuthorizationGrantRequestDVO";
// from AuthorizationGrantRequestJSON
authorizationCode: string;
authorizationDescription?: string;
authorizati... |
typescript | NOT?: AttributeScalarWhereInput[] | AttributeScalarWhereInput;
}
export interface AttributeUpdateManyWithWhereNestedInput {
where: AttributeScalarWhereInput;
data: AttributeUpdateManyDataInput;
}
|
typescript |
dispatcher.dispatch(actions.update(filer));
},
};
}; |
typescript | export * from "@src/core/components/SettingsSection"
|
typescript | type f = (
cells: Grid,
neighbours: Neighbours
) => Grid
const cellsTick: f = (cells, neighbours) =>
cellsMap<Cell>(
cells,
cellTick(neighbours)
)
export default cellsTick
|
typescript | export const Credentials = {
accessKeyId: process.env.AWS_ACCESS_KEY_ID || "",
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || "",
};
export const Region = process.env.AWS_REGION || ""
export const UserPoolId = process.env.AWS_USER_POOL_ID || "";
export const ClientId = process.env.AWS_USER_POOL_CLIENT_... |
typescript | Service.
</p>
</Modal.Content>
<Modal.Actions>
<Button className="ghost" onClick={props.onRequest}>
Request {props.missingService} Service
</Button>
<Button className="ghost" onClick={props.onClose}>
Cancel
</Button>
</Modal.Actions... |
typescript | import hooks from './dist/hooks';
export * from './dist/hooks';
export default hooks;
|
typescript | });
} else {
// We're running client-side, so we get translation data from the Sitecore dictionary API using fetch backend
// For higher performance (but less simplicity), consider adding the i18n chained backend to a local cache option like the local storage backend.
// eslint-disable-next... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.