type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(config: d.Config, tsExecutingUrl: string, url: string) => {
const tsBaseUrl = new URL('..', tsExecutingUrl).href;
if (url.startsWith(tsBaseUrl)) {
const tsFilePath = url.replace(tsBaseUrl, '/');
const tsNodePath = config.sys.getLocalModulePath({ rootDir: config.rootDir, moduleId: 'typescript', path: tsFil... | SheepFromHeaven/stencil | src/compiler/sys/typescript/typescript-sys.ts | TypeScript |
ArrowFunction |
() => {
const orgGetParsedCommandLineOfConfigFile = ts.getParsedCommandLineOfConfigFile;
ts.getParsedCommandLineOfConfigFile = (configFileName, optionsToExtend, host, extendedConfigCache) => {
const results = orgGetParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache);
... | SheepFromHeaven/stencil | src/compiler/sys/typescript/typescript-sys.ts | TypeScript |
ArrowFunction |
(configFileName, optionsToExtend, host, extendedConfigCache) => {
const results = orgGetParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache);
// manually filter out any .spec or .e2e files
results.fileNames = results.fileNames.filter(f => {
// filter e2e tests
... | SheepFromHeaven/stencil | src/compiler/sys/typescript/typescript-sys.ts | TypeScript |
ArrowFunction |
f => {
// filter e2e tests
if (f.includes('.e2e.') || f.includes('/e2e.')) {
return false;
}
// filter spec tests
if (f.includes('.spec.') || f.includes('/spec.')) {
return false;
}
return true;
} | SheepFromHeaven/stencil | src/compiler/sys/typescript/typescript-sys.ts | TypeScript |
MethodDeclaration |
close() {
watcher.close();
} | SheepFromHeaven/stencil | src/compiler/sys/typescript/typescript-sys.ts | TypeScript |
FunctionDeclaration |
export function rootContainer(container: any, opts: any) {
return React.createElement(GlobalStyles, opts, container);
} | FairyWorld/plugin_umi | examples/with-emotion/app.tsx | TypeScript |
FunctionDeclaration |
export function innerProvider(container: any) {
return React.createElement(Foo, { title: 'innerProvider' }, container);
} | FairyWorld/plugin_umi | examples/with-emotion/app.tsx | TypeScript |
FunctionDeclaration |
export function i18nProvider(container: any) {
return React.createElement(Foo, { title: 'i18nProvider' }, container);
} | FairyWorld/plugin_umi | examples/with-emotion/app.tsx | TypeScript |
FunctionDeclaration |
export function dataflowProvider(container: any) {
return React.createElement(Foo, { title: 'dataflowProvider' }, container);
} | FairyWorld/plugin_umi | examples/with-emotion/app.tsx | TypeScript |
FunctionDeclaration |
export function outerProvider(container: any) {
return React.createElement(Foo, { title: 'outerProvider' }, container);
} | FairyWorld/plugin_umi | examples/with-emotion/app.tsx | TypeScript |
FunctionDeclaration |
function Foo(props: any) {
return <div>{props.children}</div>;
} | FairyWorld/plugin_umi | examples/with-emotion/app.tsx | TypeScript |
TypeAliasDeclaration |
type cases = [
Expect<Equal<LastIndexOf<[1, 2, 3, 2, 1], 2>, 3>>,
Expect<Equal<LastIndexOf<[2, 6, 3, 8, 4, 1, 7, 3, 9], 3>, 7>>,
Expect<Equal<LastIndexOf<[0, 0, 0], 2>, -1>>,
Expect<Equal<LastIndexOf<[string, 2, number, 'a', number, 1], number>, 4>>,
Expect<Equal<LastIndexOf<[string, any, 1, number, 'a', any... | RThong/type-challenges | questions/05317-medium-lastindexof/test-cases.ts | TypeScript |
ClassDeclaration | // Persistent storage for user settings that supports a limited set of keys.
export class Settings {
static readonly STORAGE_KEY = 'settings';
private readonly settings = new Map<string, string>();
constructor(
private storage: Storage = window.localStorage,
private validKeys: string[] = Object.valu... | 84321567/vpn | src/www/app/settings.ts | TypeScript |
InterfaceDeclaration | // Copyright 2018 The 糙面云 Authors
//
// 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 agreed t... | 84321567/vpn | src/www/app/settings.ts | TypeScript |
EnumDeclaration | // Setting keys supported by the `Settings` class.
export enum SettingsKey {
VPN_WARNING_DISMISSED = 'vpn-warning-dismissed',
AUTO_CONNECT_DIALOG_DISMISSED = 'auto-connect-dialog-dismissed',
PRIVACY_ACK = 'privacy-ack'
} | 84321567/vpn | src/www/app/settings.ts | TypeScript |
MethodDeclaration |
get(key: string) {
return this.settings.get(key);
} | 84321567/vpn | src/www/app/settings.ts | TypeScript |
MethodDeclaration |
set(key: string, value: string) {
if (!this.isValidSetting(key)) {
throw new Error(`Cannot set invalid key ${key}`);
}
this.settings.set(key, value);
this.storeSettings();
} | 84321567/vpn | src/www/app/settings.ts | TypeScript |
MethodDeclaration |
remove(key: string) {
this.settings.delete(key);
this.storeSettings();
} | 84321567/vpn | src/www/app/settings.ts | TypeScript |
MethodDeclaration |
isValidSetting(key: string) {
return this.validKeys.includes(key);
} | 84321567/vpn | src/www/app/settings.ts | TypeScript |
MethodDeclaration |
private loadSettings() {
const settingsJson = this.storage.getItem(Settings.STORAGE_KEY);
if (!settingsJson) {
console.debug(`No settings found in storage`);
return;
}
const storageSettings = JSON.parse(settingsJson);
for (const key in storageSettings) {
if (storageSettings.hasOwn... | 84321567/vpn | src/www/app/settings.ts | TypeScript |
MethodDeclaration |
private storeSettings() {
const storageSettings: StorageSettings = {};
for (const [key, value] of this.settings) {
storageSettings[key] = value;
}
const storageSettingsJson = JSON.stringify(storageSettings);
this.storage.setItem(Settings.STORAGE_KEY, storageSettingsJson);
} | 84321567/vpn | src/www/app/settings.ts | TypeScript |
ClassDeclaration |
export class PINRequest {
'AdditionalInput'?: string;
'CardholderPIN'?: CardholderPIN;
'KeyReference'?: string;
'MaxWaitingTime'?: number;
'PINEncAlgorithm'?: string;
'PINFormat'?: PINRequest.PINFormatEnum;
'PINRequestType': PINRequestType;
'PINVerifMethod'?: string;
static discrim... | Adyen/adyen-node-api-library | src/typings/terminal/pINRequest.ts | TypeScript |
EnumDeclaration |
export enum PINFormatEnum {
Iso0 = <any> 'ISO0',
Iso1 = <any> 'ISO1',
Iso2 = <any> 'ISO2',
Iso3 = <any> 'ISO3'
} | Adyen/adyen-node-api-library | src/typings/terminal/pINRequest.ts | TypeScript |
MethodDeclaration |
static getAttributeTypeMap() {
return PINRequest.attributeTypeMap;
} | Adyen/adyen-node-api-library | src/typings/terminal/pINRequest.ts | TypeScript |
FunctionDeclaration |
function setup() {
const actions = {
increment: spy(),
incrementIfOdd: spy(),
incrementAsync: spy(),
decrement: spy()
};
const component = shallow(<Counter counter={1} {...actions} />);
return {
component,
actions,
buttons: component.find('button'),
p: component.find('.counter')... | BoyanXu/vocabulary-manager | test/components/Counter.spec.tsx | TypeScript |
ArrowFunction |
() => {
it('should should display count', () => {
const { p } = setup();
expect(p.text()).toMatch(/^1$/);
});
it('should first button should call increment', () => {
const { buttons, actions } = setup();
buttons.at(0).simulate('click');
expect(actions.increment.called).toBe(true);
});
i... | BoyanXu/vocabulary-manager | test/components/Counter.spec.tsx | TypeScript |
ArrowFunction |
() => {
const { p } = setup();
expect(p.text()).toMatch(/^1$/);
} | BoyanXu/vocabulary-manager | test/components/Counter.spec.tsx | TypeScript |
ArrowFunction |
() => {
const { buttons, actions } = setup();
buttons.at(0).simulate('click');
expect(actions.increment.called).toBe(true);
} | BoyanXu/vocabulary-manager | test/components/Counter.spec.tsx | TypeScript |
ArrowFunction |
() => {
const { actions } = setup();
const counter = (
<div>
<Router>
<Counter counter={1} {...actions} />
</Router>
</div> | BoyanXu/vocabulary-manager | test/components/Counter.spec.tsx | TypeScript |
ArrowFunction |
() => {
const { buttons, actions } = setup();
buttons.at(1).simulate('click');
expect(actions.decrement.called).toBe(true);
} | BoyanXu/vocabulary-manager | test/components/Counter.spec.tsx | TypeScript |
ArrowFunction |
() => {
const { buttons, actions } = setup();
buttons.at(2).simulate('click');
expect(actions.incrementIfOdd.called).toBe(true);
} | BoyanXu/vocabulary-manager | test/components/Counter.spec.tsx | TypeScript |
ArrowFunction |
() => {
const { buttons, actions } = setup();
buttons.at(3).simulate('click');
expect(actions.incrementAsync.called).toBe(true);
} | BoyanXu/vocabulary-manager | test/components/Counter.spec.tsx | TypeScript |
FunctionDeclaration |
export function initializeLocalization() {
// messages.js are generated by ``yarn lingui-compile``
languages.forEach(
(code) => (catalogs[code] = require(`../../locale/${code}/messages.js`))
);
currentUILanguage = userSettings.UILanguage;
// if the language in the settings isn't one this version ... | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration |
export function setUILanguage(code: string): void {
currentUILanguage = code;
i18n.use(code);
userSettings.UILanguage = code;
remote.getCurrentWindow().reload();
} | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration | // call to this must have the comment /*18n*/ in order for the lingui scanner to find it
// e.g. translationMessage(/*18n*/{id: "foobar"})
export function translateMessage(arg: { id: string }): string {
if (i18n) {
return i18n._(arg.id);
} // unit testing
else return arg.id;
} | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration |
export function translateFileType(englishTypeName: string): string {
switch (englishTypeName) {
case "Project":
return i18n._(t`Project`);
case "Session":
return i18n._(t`Session`);
case "Person":
return i18n._(t`Person`);
case "Video":
return i18n._(t`Video`);
c... | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration |
export function translateFieldLabel(fieldDef: FieldDefinition): string {
if (fieldDef === undefined) {
return "LABEL ERROR";
}
return getMatch(fields, fieldDef.englishLabel, "fields.csv");
} | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration |
export function translateTooltip(fieldDef: FieldDefinition): string {
if (!fieldDef.tooltip) {
return "";
}
return fieldDef.tooltip ? getMatch(tips, fieldDef.tooltip, "tips.csv") : "";
} | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration |
export function translateTooltipNotice(notice: string): string {
return getMatch(tips, notice, "tips.csv");
} | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration |
export function translateSpecialInfo(fieldDef: FieldDefinition): string {
if (!fieldDef.specialInfo) {
return "";
}
return fieldDef.specialInfo
? getMatch(tips, fieldDef.specialInfo, "tips.csv")
: "";
} | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration |
export function translateAccessProtocol(choice: string): string {
return getMatch(accessProtocols, choice, "accessProtocols.csv");
} | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration |
export function translateChoice(choice: string, fieldName?: string): string {
return getMatch(choices, choice, "choices.csv", fieldName);
} | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration |
export function translateRole(role: string) {
const roleChoice: IChoice | undefined = olacRoles.find((c) => c.id === role);
return getMatch(roles, roleChoice?.label || role, "roles.csv");
} | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration |
export function translateGenre(genre: string) {
return getMatch(genres, genre, "genres.csv");
} | onset/lameta | app/other/localization.ts | TypeScript |
FunctionDeclaration |
function getMatch(
lines: any[],
s: string,
fileThatShouldHaveThis: string,
fieldName?: string
): string {
const match = lines.find((f) => f.en === s);
if (currentUILanguage === "ps") {
// do we have a column for english for this?
if (match && match["en"]) return s + "✓";
else {
... | onset/lameta | app/other/localization.ts | TypeScript |
ArrowFunction |
(code) => (catalogs[code] = require(`../../locale/${code}/messages.js`)) | onset/lameta | app/other/localization.ts | TypeScript |
ArrowFunction |
(c) => c.id === role | onset/lameta | app/other/localization.ts | TypeScript |
ArrowFunction |
(f) => f.en === s | onset/lameta | app/other/localization.ts | TypeScript |
ArrowFunction |
() => {
let props: NodeExecutionsTableProps;
let apiContext: APIContextValue;
let executionContext: ExecutionContextData;
let dataCache: ExecutionDataCache;
let requestConfig: RequestConfig;
let mockNodeExecutions: NodeExecution[];
let mockGetExecution: jest.Mock<ReturnType<typeof getExecut... | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
() => {
const {
nodeExecutions,
workflow,
workflowExecution
} = createMockExecutionEntities({
workflowName: 'SampleWorkflow',
nodeExecutionCount: 2
});
mockNodeExecutions = nodeExecutions;
mockListTaskExecutions = jes... | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
async (id: WorkflowExecutionIdentifier) => {
return { ...createMockExecution(id.name), id };
} | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
async (id: Identifier) => {
return { template: { ...mockTasks[0].template, id } };
} | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
() =>
render(
<APIContext.Provider value={apiContext}>
<NodeExecutionsRequestConfigContext.Provider
value={requestConfig}
>
<ExecutionContext.Provider value={executionContext}>
<ExecutionDataCacheContext... | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
async () => {
const { queryAllByText } = renderTable();
await waitFor(() => {});
const node = dataCache.getNodeForNodeExecution(
mockNodeExecutions[0].id
);
const taskId = node?.node.taskNode?.referenceId;
expect(taskId).toBeDefined();
const task = d... | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
async () => {
const { taskExecutions } = createMockTaskExecutionsListResponse(1);
taskExecutions[0].isParent = true;
mockListTaskExecutions.mockResolvedValue({ entities: taskExecutions });
requestConfig.filter = [
{ key: 'test', operation: FilterOperationName.EQ, value: 'tes... | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
() =>
expect(mockListTaskExecutionChildren).toHaveBeenCalled() | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
() => {
let taskNodeMetadata: TaskNodeMetadata;
let cachedNodeExecution: NodeExecution;
beforeEach(() => {
cachedNodeExecution = mockNodeExecutions[0];
taskNodeMetadata = {
cacheStatus: Core.CatalogCacheStatus.CACHE_MISS,
catalogKey: {
... | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
() => {
cachedNodeExecution = mockNodeExecutions[0];
taskNodeMetadata = {
cacheStatus: Core.CatalogCacheStatus.CACHE_MISS,
catalogKey: {
datasetId: makeIdentifier({
resourceType: Core.ResourceType.DATASET
... | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
cacheStatusValue =>
it(`renders correct icon for ${Core.CatalogCacheStatus[cacheStatusValue]}`, async () => {
taskNodeMetadata.cacheStatus = cacheStatusValue;
const { getByTitle } = renderTable();
await waitFor(() =>
getByTitle(cacheStatus... | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
async () => {
taskNodeMetadata.cacheStatus = cacheStatusValue;
const { getByTitle } = renderTable();
await waitFor(() =>
getByTitle(cacheStatusMessages[cacheStatusValue])
);
} | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
() =>
getByTitle(cacheStatusMessages[cacheStatusValue]) | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
cacheStatusValue =>
it(`renders no icon for ${Core.CatalogCacheStatus[cacheStatusValue]}`, async () => {
taskNodeMetadata.cacheStatus = cacheStatusValue;
const { getByText, queryByTitle } = renderTable();
await waitFor(() => getByText(cachedNodeExecution.id.n... | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
async () => {
taskNodeMetadata.cacheStatus = cacheStatusValue;
const { getByText, queryByTitle } = renderTable();
await waitFor(() => getByText(cachedNodeExecution.id.nodeId));
expect(
queryByTitle(cacheStatusMessages[cacheStatusValue]... | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
() => getByText(cachedNodeExecution.id.nodeId) | honnix/flyteconsole | src/components/Executions/Tables/test/NodeExecutionsTable.test.tsx | TypeScript |
ArrowFunction |
async (params: DataModels.CreateCollectionParams): Promise<DataModels.Collection> => {
const clearMessage = logConsoleProgress(
`Creating a new container ${params.collectionId} for database ${params.databaseId}`
);
try {
let collection: DataModels.Collection;
if (userContext.authType === AuthType.AAD... | Azure/cosmos-explorer | src/Common/dataAccess/createCollection.ts | TypeScript |
ArrowFunction |
async (params: DataModels.CreateCollectionParams): Promise<DataModels.Collection> => {
if (!params.createNewDatabase) {
const isValid = await useDatabases.getState().validateCollectionId(params.databaseId, params.collectionId);
if (!isValid) {
const collectionName = getCollectionName().toLocaleLowerCas... | Azure/cosmos-explorer | src/Common/dataAccess/createCollection.ts | TypeScript |
ArrowFunction |
async (params: DataModels.CreateCollectionParams): Promise<DataModels.Collection> => {
const options: ARMTypes.CreateUpdateOptions = constructRpOptions(params);
const resource: ARMTypes.SqlContainerResource = {
id: params.collectionId,
};
if (params.analyticalStorageTtl) {
resource.analyticalStorageTtl... | Azure/cosmos-explorer | src/Common/dataAccess/createCollection.ts | TypeScript |
ArrowFunction |
async (params: DataModels.CreateCollectionParams): Promise<DataModels.Collection> => {
const mongoWildcardIndexOnAllFields: ARMTypes.MongoIndex[] = [{ key: { keys: ["$**"] } }, { key: { keys: ["_id"] } }];
const options: ARMTypes.CreateUpdateOptions = constructRpOptions(params);
const resource: ARMTypes.MongoDBC... | Azure/cosmos-explorer | src/Common/dataAccess/createCollection.ts | TypeScript |
ArrowFunction |
async (params: DataModels.CreateCollectionParams): Promise<DataModels.Collection> => {
const options: ARMTypes.CreateUpdateOptions = constructRpOptions(params);
const resource: ARMTypes.CassandraTableResource = {
id: params.collectionId,
};
if (params.analyticalStorageTtl) {
resource.analyticalStorageT... | Azure/cosmos-explorer | src/Common/dataAccess/createCollection.ts | TypeScript |
ArrowFunction |
async (params: DataModels.CreateCollectionParams): Promise<DataModels.Collection> => {
const options: ARMTypes.CreateUpdateOptions = constructRpOptions(params);
const resource: ARMTypes.GremlinGraphResource = {
id: params.collectionId,
};
if (params.indexingPolicy) {
resource.indexingPolicy = params.i... | Azure/cosmos-explorer | src/Common/dataAccess/createCollection.ts | TypeScript |
ArrowFunction |
async (params: DataModels.CreateCollectionParams): Promise<DataModels.Collection> => {
const options: ARMTypes.CreateUpdateOptions = constructRpOptions(params);
const resource: ARMTypes.TableResource = {
id: params.collectionId,
};
const rpPayload: ARMTypes.TableCreateUpdateParameters = {
properties: ... | Azure/cosmos-explorer | src/Common/dataAccess/createCollection.ts | TypeScript |
ArrowFunction |
(params: DataModels.CreateDatabaseParams): ARMTypes.CreateUpdateOptions => {
if (params.databaseLevelThroughput) {
return {};
}
if (params.autoPilotMaxThroughput) {
return {
autoscaleSettings: {
maxThroughput: params.autoPilotMaxThroughput,
},
};
}
return {
throughput: p... | Azure/cosmos-explorer | src/Common/dataAccess/createCollection.ts | TypeScript |
ArrowFunction |
async (params: DataModels.CreateCollectionParams): Promise<DataModels.Collection> => {
const createCollectionBody: ContainerRequest = {
id: params.collectionId,
partitionKey: params.partitionKey || undefined,
indexingPolicy: params.indexingPolicy || undefined,
uniqueKeyPolicy: params.uniqueKeyPolicy ... | Azure/cosmos-explorer | src/Common/dataAccess/createCollection.ts | TypeScript |
TypeAliasDeclaration |
type Menu = {
Monday: ["Steak and lettuce", "Codd and tomatoes"],
Tuesday: ["Chicken and carrots", "Peas and carrots"],
Wednesday: ["Fish and chips", "Turkey and stuffing"],
Thursday: ["Sushi and rice", "Wok and noodles"],
Friday: ["Lamb and tomatoes", "Salmon and cheese"],
Saturday: ["Spaghetti and pesto"... | entropitor/typescript-exercises | src/exercises/21/test.ts | TypeScript |
TypeAliasDeclaration |
type MealsWithSteak = MealsWithIngredient<"Steak"> | entropitor/typescript-exercises | src/exercises/21/test.ts | TypeScript |
TypeAliasDeclaration |
type MealsWithFries = MealsWithIngredient<"Fries"> | entropitor/typescript-exercises | src/exercises/21/test.ts | TypeScript |
TypeAliasDeclaration |
type MealsWithTomatoes = MealsWithIngredient<"tomatoes"> | entropitor/typescript-exercises | src/exercises/21/test.ts | TypeScript |
TypeAliasDeclaration |
type MealsWithHummus = MealsWithIngredient<"hummus"> | entropitor/typescript-exercises | src/exercises/21/test.ts | TypeScript |
TypeAliasDeclaration |
type DaysWithSteak = DaysWith<"Steak"> | entropitor/typescript-exercises | src/exercises/21/test.ts | TypeScript |
TypeAliasDeclaration |
type DaysWithFries = DaysWith<"Fries"> | entropitor/typescript-exercises | src/exercises/21/test.ts | TypeScript |
TypeAliasDeclaration |
type DaysWithTomatoes = DaysWith<"tomatoes"> | entropitor/typescript-exercises | src/exercises/21/test.ts | TypeScript |
TypeAliasDeclaration |
type DaysWithHummus = DaysWith<"hummus"> | entropitor/typescript-exercises | src/exercises/21/test.ts | TypeScript |
ArrowFunction |
(props: any) => {
const { inputLabel, children, width, loading, ...rest } = props;
const setWidth = width ? width : 210;
const StyledInputFlex = styled.div`
display: flex;
align-items: center;
overflow-x: hidden;
height: 40px;
`;
const StyledInput = styled.div`
color: ${p => lig... | ezynda3/ren-js | packages/ui/gateway.renproject.io/src/components/views/LabelledInput.tsx | TypeScript |
ArrowFunction |
p => lighten(0.1, p.theme.primaryColor) | ezynda3/ren-js | packages/ui/gateway.renproject.io/src/components/views/LabelledInput.tsx | TypeScript |
ArrowFunction |
p => p.theme.lightGrey | ezynda3/ren-js | packages/ui/gateway.renproject.io/src/components/views/LabelledInput.tsx | TypeScript |
ArrowFunction |
(props: any) => {
const { inputLabel, children, width, ...rest } = props;
const setWidth = width ? width : 210;
const StyledInput = styled.input`
color: ${p => lighten(0.1, p.theme.primaryColor)} !important;
font-size: 14px !important;
font-weight: 400 !important;
`;
const DepositLabel... | ezynda3/ren-js | packages/ui/gateway.renproject.io/src/components/views/LabelledInput.tsx | TypeScript |
ArrowFunction |
(props) => {
const {repoAddress} = props;
const {canLaunchPipelineExecution} = usePermissions();
return (
<div
style={{
display: 'flex',
flexDirection: 'column',
minWidth: 0,
width: '100%',
height: '100%',
}} | AndreaGiardini/dagster | js_modules/dagit/packages/core/src/pipelines/PipelineRoot.tsx | TypeScript |
InterfaceDeclaration |
interface Props {
repoAddress: RepoAddress;
} | AndreaGiardini/dagster | js_modules/dagit/packages/core/src/pipelines/PipelineRoot.tsx | TypeScript |
ClassDeclaration |
@Injectable()
export class ClassroomService {
constructor(private prisma: PrismaService) {}
create(createClassroomInput: CreateClassroomInput): Promise<Classroom> {
return this.prisma.classroom.create({
data: createClassroomInput,
});
}
findAll(): Promise<Classroom[]> {
return this.prisma.c... | Lucier/enotas-api | src/modules/classrooms/services/classroom.service.ts | TypeScript |
MethodDeclaration |
create(createClassroomInput: CreateClassroomInput): Promise<Classroom> {
return this.prisma.classroom.create({
data: createClassroomInput,
});
} | Lucier/enotas-api | src/modules/classrooms/services/classroom.service.ts | TypeScript |
MethodDeclaration |
findAll(): Promise<Classroom[]> {
return this.prisma.classroom.findMany();
} | Lucier/enotas-api | src/modules/classrooms/services/classroom.service.ts | TypeScript |
MethodDeclaration |
findOne(id: string): Promise<Classroom> {
return this.prisma.classroom.findUnique({
where: {
id,
},
});
} | Lucier/enotas-api | src/modules/classrooms/services/classroom.service.ts | TypeScript |
MethodDeclaration |
update(
id: string,
updateClassroomInput: UpdateClassroomInput,
): Promise<Classroom> {
const { name } = updateClassroomInput;
return this.prisma.classroom.update({
where: {
id,
},
data: {
...(name && { name }),
},
});
} | Lucier/enotas-api | src/modules/classrooms/services/classroom.service.ts | TypeScript |
MethodDeclaration |
remove(id: string): Promise<Classroom> {
return this.prisma.classroom.delete({
where: {
id,
},
});
} | Lucier/enotas-api | src/modules/classrooms/services/classroom.service.ts | TypeScript |
ClassDeclaration |
@Injectable({
providedIn: 'root'
})
export class UserService {
constructor(private http:HttpClient) { }
getDepartmentTeachers(sheetId:number){
return this.http.get<User[]>("/api/users/teachers/ofdepartment/"+sheetId)
}
getStudentOfSheet(sheetId:number){
return this.http.get<User>("/api/users/stud... | yacinbenhamida/internspace-frontend | src/app/services/security/user.service.ts | TypeScript |
MethodDeclaration |
getDepartmentTeachers(sheetId:number){
return this.http.get<User[]>("/api/users/teachers/ofdepartment/"+sheetId)
} | yacinbenhamida/internspace-frontend | src/app/services/security/user.service.ts | TypeScript |
MethodDeclaration |
getStudentOfSheet(sheetId:number){
return this.http.get<User>("/api/users/studentsBySheet/"+sheetId)
} | yacinbenhamida/internspace-frontend | src/app/services/security/user.service.ts | TypeScript |
MethodDeclaration |
getUserById(id:number){
return this.http.get<User>("/api/users/"+id)
} | yacinbenhamida/internspace-frontend | src/app/services/security/user.service.ts | TypeScript |
MethodDeclaration |
getAllUsers(){
return this.http.get<User[]>("/api/student/isnonautorised")
} | yacinbenhamida/internspace-frontend | src/app/services/security/user.service.ts | TypeScript |
MethodDeclaration |
allowStudent(id:number){
return this.http.get<User>("/api/student/authorize?id="+id)
} | yacinbenhamida/internspace-frontend | src/app/services/security/user.service.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.