type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
@autobind
async handleOptionDelete(value: any) {
let {
deleteConfirmText,
disabled,
data,
deleteApi,
env,
formItem: model,
source,
valueField,
translate: __
} = this.props;
if (disabled || !model) {
return;
}
... | EasonYi/amis | src/renderers/Form/Options.tsx | TypeScript |
MethodDeclaration |
render() {
const {
value,
formItem,
addApi,
editApi,
deleteApi,
creatable,
editable,
removable
} = this.props;
return (
<Control
{...this.props}
ref={this.inputRef}
options={formItem ? formItem.filt... | EasonYi/amis | src/renderers/Form/Options.tsx | TypeScript |
TypeAliasDeclaration |
type abbreviation< | Stivovo/bitcoin | src/qt/locale/bitcoin_mk_MK.ts | TypeScript |
ClassDeclaration |
@Injectable()
export class UsersService {
constructor(@Inject(USER_REPOSITORY) private readonly userRepository: typeof User) { }
async create(user: UserDto): Promise<User> {
// @ts-ignore
return await this.userRepository.create<User>(user);
}
async findOneByEmailOrPhone(emailOrPhone: string): Promis... | dogfox-gh/market-guru-test | src/modules/users/users.service.ts | TypeScript |
MethodDeclaration |
async create(user: UserDto): Promise<User> {
// @ts-ignore
return await this.userRepository.create<User>(user);
} | dogfox-gh/market-guru-test | src/modules/users/users.service.ts | TypeScript |
MethodDeclaration |
async findOneByEmailOrPhone(emailOrPhone: string): Promise<User> {
return await this.userRepository.findOne<User>({
where: {
[Op.or]: [{ email: emailOrPhone }, { phone: emailOrPhone }],
},
});
} | dogfox-gh/market-guru-test | src/modules/users/users.service.ts | TypeScript |
MethodDeclaration |
async findOneByEmail(email: string): Promise<User> {
return await this.userRepository.findOne<User>({ where: { email } });
} | dogfox-gh/market-guru-test | src/modules/users/users.service.ts | TypeScript |
MethodDeclaration |
async findOneByPhone(phone: string): Promise<User> {
return await this.userRepository.findOne<User>({ where: { phone } });
} | dogfox-gh/market-guru-test | src/modules/users/users.service.ts | TypeScript |
MethodDeclaration |
async findOneById(id: number): Promise<User> {
return await this.userRepository.findOne<User>({ where: { id } });
} | dogfox-gh/market-guru-test | src/modules/users/users.service.ts | TypeScript |
MethodDeclaration |
async getAll(
search = '',
page = 1,
perPage = 10,
): Promise<{ rows: User[]; count: number }> {
return await this.userRepository.findAndCountAll({
where: {
[Op.or]: [
{ name: { [Op.iLike]: `%${search}%` } },
{ email: { [Op.iLike]: `%${search}%` } },
],
... | dogfox-gh/market-guru-test | src/modules/users/users.service.ts | TypeScript |
ArrowFunction |
(data, ctx: ExecutionContext): User => {
const req = ctx.switchToHttp().getRequest();
return req.user;
} | ionc635/nestjs-inflearn | src/util/costom-decorate.ts | TypeScript |
ArrowFunction |
(exists) => {
if (exists) {
// The shortcut already exists, no need to do anything
return;
}
// Create the shortcut
let properties = {
target: process.execPath,
args: path.resolve(__dirname+'/../..'),
workingDir: path.resolve(__dirname+'/../..'),
icon: this.faviconIco,
desc: th... | spidgorny/working-time-alert | src/TrayHandler.ts | TypeScript |
ArrowFunction |
(err: any) => {
if (err) throw err;
// Add the app ID to the shortcut
ws.addAppId(shortcutPath, this.appId, (err: any) => {
if (err) throw err;
// Ready!
});
} | spidgorny/working-time-alert | src/TrayHandler.ts | TypeScript |
ArrowFunction |
(err: any) => {
if (err) throw err;
// Ready!
} | spidgorny/working-time-alert | src/TrayHandler.ts | TypeScript |
ClassDeclaration |
export class TrayHandler {
readonly appId = "eu.nintendo.working-time-alert";
readonly appName = 'Working Time Alert 2.0';
favicon: string;
faviconIco: string;
app: any;
window: BrowserWindow;
store: {
set(s: string, v: any): void;
get(s: string): any;
};
autoLauncher: any;
private appSlogan: str... | spidgorny/working-time-alert | src/TrayHandler.ts | TypeScript |
MethodDeclaration |
async handleTray() {
const appIcon = new Tray(this.favicon);
const autoStart = await this.autoLauncher.isEnabled();
const contextMenu = Menu.buildFromTemplate([
{
label: 'Toggle Window',
click: this.toggleWindow.bind(this)
},
{
label: 'Autostart with Windows',
click: this.toggleAutostar... | spidgorny/working-time-alert | src/TrayHandler.ts | TypeScript |
MethodDeclaration |
toggleWindow() {
this.window.isVisible()
? this.window.hide()
: this.window.show();
} | spidgorny/working-time-alert | src/TrayHandler.ts | TypeScript |
MethodDeclaration |
async toggleAutostart() {
const enabled = await this.autoLauncher.isEnabled();
if (enabled) {
this.autoLauncher.disable();
} else {
this.autoLauncher.enable();
}
} | spidgorny/working-time-alert | src/TrayHandler.ts | TypeScript |
MethodDeclaration |
hasShortcut() {
const shortcutPath = process.env.APPDATA + "\\Microsoft\\Windows\\Start Menu\\Programs\\" + this.appName + ".lnk";
// console.log(shortcutPath);
return fs.existsSync(shortcutPath);
} | spidgorny/working-time-alert | src/TrayHandler.ts | TypeScript |
MethodDeclaration |
createProgramsShortcut() {
this.app.setAppUserModelId(this.appId);
const shortcutPath = process.env.APPDATA + "\\Microsoft\\Windows\\Start Menu\\Programs\\" + this.appName + ".lnk";
// console.log(shortcutPath);
fs.exists(shortcutPath, (exists) => {
if (exists) {
// The shortcut already exists, no nee... | spidgorny/working-time-alert | src/TrayHandler.ts | TypeScript |
MethodDeclaration |
quit() {
this.app.quit();
process.exit();
} | spidgorny/working-time-alert | src/TrayHandler.ts | TypeScript |
ClassDeclaration |
export default class TelegramConnector
implements Connector<TelegramRequestBody, TelegramClient> {
_client: TelegramClient;
_skipLegacyProfile: boolean;
constructor(options: ConstructorOptions) {
const { skipLegacyProfile } = options;
if ('client' in options) {
this._client = options.client;
... | Mqter/bottender | src/telegram/TelegramConnector.ts | TypeScript |
TypeAliasDeclaration |
export type TelegramRequestBody = TelegramRawEvent; | Mqter/bottender | src/telegram/TelegramConnector.ts | TypeScript |
TypeAliasDeclaration |
type ConstructorOptionsWithoutClient = {
accessToken: string;
origin?: string;
skipLegacyProfile?: boolean;
}; | Mqter/bottender | src/telegram/TelegramConnector.ts | TypeScript |
TypeAliasDeclaration |
type ConstructorOptionsWithClient = {
client: TelegramClient;
skipLegacyProfile?: boolean;
}; | Mqter/bottender | src/telegram/TelegramConnector.ts | TypeScript |
TypeAliasDeclaration |
type ConstructorOptions =
| ConstructorOptionsWithoutClient
| ConstructorOptionsWithClient; | Mqter/bottender | src/telegram/TelegramConnector.ts | TypeScript |
MethodDeclaration |
_getRawEventFromRequest(body: TelegramRequestBody): TelegramRawEvent {
return body;
} | Mqter/bottender | src/telegram/TelegramConnector.ts | TypeScript |
MethodDeclaration |
getUniqueSessionKey(body: TelegramRequestBody): string {
if (body.message) {
return `${body.message.chat.id}`;
}
if (body.editedMessage) {
return `${body.editedMessage.chat.id}`;
}
if (body.channelPost) {
return `${body.channelPost.chat.id}`;
}
if (body.editedChannelPost) ... | Mqter/bottender | src/telegram/TelegramConnector.ts | TypeScript |
MethodDeclaration |
async updateSession(
session: Session,
body: TelegramRequestBody
): Promise<void> {
let channel;
if (body.channelPost) {
channel = body.channelPost.chat;
} else if (body.editedChannelPost) {
channel = body.editedChannelPost.chat;
}
if (channel) {
if (this._skipLegacyPro... | Mqter/bottender | src/telegram/TelegramConnector.ts | TypeScript |
MethodDeclaration |
mapRequestToEvents(body: TelegramRequestBody): TelegramEvent[] {
const rawEvent = this._getRawEventFromRequest(body);
return [new TelegramEvent(rawEvent)];
} | Mqter/bottender | src/telegram/TelegramConnector.ts | TypeScript |
MethodDeclaration |
createContext(params: {
event: TelegramEvent;
session: Session | null;
initialState?: Record<string, any> | null;
requestContext?: RequestContext;
emitter?: EventEmitter | null;
}): TelegramContext {
return new TelegramContext({
...params,
client: this._client,
});
} | Mqter/bottender | src/telegram/TelegramConnector.ts | TypeScript |
MethodDeclaration |
preprocess(): {
shouldNext: true;
} {
return {
shouldNext: true,
};
} | Mqter/bottender | src/telegram/TelegramConnector.ts | TypeScript |
ArrowFunction |
() => {
useInjectReducer({ key: slice.name, reducer: slice.reducer });
useInjectSaga({ key: slice.name, saga: stockDetailsPageSaga });
return { actions: slice.actions };
} | alperez909/stock-wrek | src/app/pages/StocksPage/slice/index.ts | TypeScript |
MethodDeclaration |
changeTicker(state, actions: PayloadAction<string>) {
state.ticker = actions.payload;
} | alperez909/stock-wrek | src/app/pages/StocksPage/slice/index.ts | TypeScript |
MethodDeclaration |
changePeriod(state, actions: PayloadAction<StockPeriod>) {
state.period = actions.payload;
} | alperez909/stock-wrek | src/app/pages/StocksPage/slice/index.ts | TypeScript |
FunctionDeclaration |
async function loadCalendar(): Promise<(Calendar | undefined)> {
try {
const result = await instance.get('<CALENDAR_NAME>/public/basic.ics');
const { data } = result;
const rawCalendar = await CalendarParser.parseContent(data);
return new Calendar(rawCalendar);
} catch (err) {... | rareelement/lydia | examples/basic_usage.ts | TypeScript |
ArrowFunction |
async () => {
try {
const calendar: Calendar | undefined = await loadCalendar();
if (!calendar) {
return undefined;
}
const eventMap: Array<[Date, Component]> = calendar.getEvents({ start: new Date(), limit: 12 });
eventMap
.map(
(e... | rareelement/lydia | examples/basic_usage.ts | TypeScript |
ArrowFunction |
(entry) => ({
start: entry[1].getStart().value,
end: entry[1].getEnd().value,
description: entry[1].getDescription(),
summary: entry[1].getSummary()
}) | rareelement/lydia | examples/basic_usage.ts | TypeScript |
ArrowFunction |
({ description, start, end, summary }) => console.log(description, 'starts', start, 'ends', end, summary) | rareelement/lydia | examples/basic_usage.ts | TypeScript |
FunctionDeclaration | /**
* Domain service.
* API Version: 2021-03-01.
*/
export function getDomainService(args: GetDomainServiceArgs, opts?: pulumi.InvokeOptions): Promise<GetDomainServiceResult> {
if (!opts) {
opts = {}
}
if (!opts.version) {
opts.version = utilities.getVersion();
}
return pulumi.ru... | polivbr/pulumi-azure-native | sdk/nodejs/aad/getDomainService.ts | TypeScript |
InterfaceDeclaration |
export interface GetDomainServiceArgs {
/**
* The name of the domain service.
*/
domainServiceName: string;
/**
* The name of the resource group within the user's subscription. The name is case insensitive.
*/
resourceGroupName: string;
} | polivbr/pulumi-azure-native | sdk/nodejs/aad/getDomainService.ts | TypeScript |
InterfaceDeclaration | /**
* Domain service.
*/
export interface GetDomainServiceResult {
/**
* Deployment Id
*/
readonly deploymentId: string;
/**
* Domain Configuration Type
*/
readonly domainConfigurationType?: string;
/**
* The name of the Azure domain that the user would like to deploy Doma... | polivbr/pulumi-azure-native | sdk/nodejs/aad/getDomainService.ts | TypeScript |
ClassDeclaration |
@Controller('tasks')
export class TasksController {
constructor(private tasksService: TasksService) { }
@Get()
getTasks(@Query(ValidationPipe) filterDto: GetTasksFilterDto): Task[] {
if (Object.keys(filterDto).length) {
return this.tasksService.getTasksWithFilter(filterDto)
}
... | jahanzaibbaloch99/task-management-nest-js-backend | src/tasks/tasks.controller.ts | TypeScript |
MethodDeclaration |
@Get()
getTasks(@Query(ValidationPipe) filterDto: GetTasksFilterDto): Task[] {
if (Object.keys(filterDto).length) {
return this.tasksService.getTasksWithFilter(filterDto)
}
return this.tasksService.getAllTasks()
} | jahanzaibbaloch99/task-management-nest-js-backend | src/tasks/tasks.controller.ts | TypeScript |
MethodDeclaration |
@Get("/:id")
getTaskById(@Param("id") id: string): Task {
return this.tasksService.getTaskById(id)
} | jahanzaibbaloch99/task-management-nest-js-backend | src/tasks/tasks.controller.ts | TypeScript |
MethodDeclaration |
@Post()
@UsePipes(ValidationPipe)
createTask(@Body() createTaskDto: CreateTaskDto): Task {
return this.tasksService.createTask(createTaskDto)
} | jahanzaibbaloch99/task-management-nest-js-backend | src/tasks/tasks.controller.ts | TypeScript |
MethodDeclaration |
@Delete("/:id")
deleteTaskById(@Param("id") id: string): void {
return this.tasksService.deleteTaskById(id)
} | jahanzaibbaloch99/task-management-nest-js-backend | src/tasks/tasks.controller.ts | TypeScript |
MethodDeclaration |
@Patch(":id/status")
updateTaskStatus(@Param("id") id: string, @Body('status' ,TaskStatusValidationPipe) status: TaskStatus): Task {
return this.tasksService.updateTaskStatus(id, status)
} | jahanzaibbaloch99/task-management-nest-js-backend | src/tasks/tasks.controller.ts | TypeScript |
ClassDeclaration |
export abstract class NodoXQ {
linea: number = -1;
columna: number = -1;
//traducir(): string {}
} | 18SebastianVC/tytusx | 20211SVAC/G13/ts/XQuery/NodoXQ.ts | TypeScript |
FunctionDeclaration | /**
* This function needs to be called before monaco.editor.create().
*
* @param languages the set of languages Monaco must know about up front.
* @param fetchLanguageInfo fetches full language configuration on demand.
* @param monaco instance of Monaco on which to register languages information.
*/
export functi... | cloa-io/monaco-tm | src/register.ts | TypeScript |
FunctionDeclaration |
function createDependencyProposals(range: any) {
// returning a static list of proposals, not even looking at the prefix (filtering is done by the Monaco editor),
// here you could do a server side lookup
return Object.entries(bigquery).map(([key, value]) => {
const body = typeof value.body === 'str... | cloa-io/monaco-tm | src/register.ts | TypeScript |
ArrowFunction |
([key, value]) => {
const body = typeof value.body === 'string' ? value.body : value.body.join("\n");
const description = (value as any).description;
return {
label: typeof value.prefix === 'string' ? value.prefix : value.prefix[0],
kind: monaco.languages.CompletionItemKind.Snippet,
... | cloa-io/monaco-tm | src/register.ts | TypeScript |
ArrowFunction |
async () => {
const {tokensProvider, configuration} = await fetchLanguageInfo(languageId);
if (tokensProvider != null) {
monaco.languages.setTokensProvider(languageId, tokensProvider);
}
if (configuration != null) {
monaco.languages.setLanguageConfiguration(languageId, configu... | cloa-io/monaco-tm | src/register.ts | TypeScript |
TypeAliasDeclaration |
type Monaco = typeof monaco; | cloa-io/monaco-tm | src/register.ts | TypeScript |
TypeAliasDeclaration | /** String identifier like 'cpp' or 'java'. */
export type LanguageId = string; | cloa-io/monaco-tm | src/register.ts | TypeScript |
TypeAliasDeclaration |
export type LanguageInfo = {
tokensProvider: monaco.languages.EncodedTokensProvider | null;
configuration: monaco.languages.LanguageConfiguration | null;
}; | cloa-io/monaco-tm | src/register.ts | TypeScript |
FunctionDeclaration |
function roleAsTag(role: GQLUSER_ROLE) {
switch (role) {
case GQLUSER_ROLE.ADMIN:
return GQLTAG.ADMIN;
case GQLUSER_ROLE.MODERATOR:
return GQLTAG.MODERATOR;
case GQLUSER_ROLE.STAFF:
return GQLTAG.STAFF;
default:
return null;
}
} | Emptyfruit/talk | src/core/server/services/comments/pipeline/phases/staff.ts | TypeScript |
ArrowFunction |
({
author,
}): IntermediatePhaseResult | void => {
const staffTag = roleAsTag(author.role);
if (staffTag) {
return {
tags: [staffTag],
};
}
} | Emptyfruit/talk | src/core/server/services/comments/pipeline/phases/staff.ts | TypeScript |
ClassDeclaration | /**
* @whatItDoes The module for the meals feature
* @see [Angular 2 docs - the feature module](https://angular.io/guide/ngmodule#feature-modules)
*/
@NgModule({
imports: [
MealsSharedModule,
MealsRouting,
CommonModule
]
})
export class MealsModule { } | BulkSecurityGeneratorProject/great-big-example-application | src/main/webapp/app/features/meals/meals.module.ts | TypeScript |
ArrowFunction |
isDarkTheme => {
const bodyClassList = this.document.body.classList;
if (isDarkTheme) {
bodyClassList.add('dark-theme');
} else {
bodyClassList.remove('dark-theme');
}
} | muffl0n/o-neko | frontend/src/app/app.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
@Select(ThemingState.isDarkMode) isDarkTheme$: Observable<boolean>;
constructor(private store: Store, @Inject(DOCUMENT) private document: Document) {
this.isDarkThe... | muffl0n/o-neko | frontend/src/app/app.component.ts | TypeScript |
ClassDeclaration |
export class BackendCommand {
constructor(
private backendLintCommand: BackendLintCommand,
private backendTestCommand: BackendTestCommand,
private backendBuildCommand: BackendBuildCommand,
private backendPushCommand: BackendPushCommand,
private backendDeployCommand: BackendDeployCommand,
priv... | Sheetbase/cli | src/cli/commands/backend.command.ts | TypeScript |
InterfaceDeclaration |
interface BackendCommandOptions
extends BackendDeployCommandOptions,
BackendInstallCommandOptions,
BackendUninstallCommandOptions,
BackendRunCommandOptions,
BackendUnknownCommandOptions {} | Sheetbase/cli | src/cli/commands/backend.command.ts | TypeScript |
MethodDeclaration |
run(
subCommand: string,
params: string[],
commandOptions: BackendCommandOptions
) {
switch (subCommand) {
case 'lint':
this.backendLintCommand.run();
break;
case 'test':
this.backendTestCommand.run();
break;
case 'build':
this.backendBuildCom... | Sheetbase/cli | src/cli/commands/backend.command.ts | TypeScript |
ArrowFunction |
<T, V>(enumType: T, value: V): [string, V] => {
return Object
.entries(enumType)
.map(entries => entries)
.find(entry => entry.includes(value));
} | dvsa/mes-mobile-app | src/shared/helpers/enum-keys.ts | TypeScript |
ArrowFunction |
entries => entries | dvsa/mes-mobile-app | src/shared/helpers/enum-keys.ts | TypeScript |
ArrowFunction |
entry => entry.includes(value) | dvsa/mes-mobile-app | src/shared/helpers/enum-keys.ts | TypeScript |
ArrowFunction |
() => {
it('create an instance', () => {
const pipe = new ReversePipe();
expect(pipe).toBeTruthy();
});
} | MHL3060/ngx-dynamic-dashboard-framework | projects/ngx-dynamic-dashboard/src/dashboard/toast/reverse.pipe.spec.ts | TypeScript |
ArrowFunction |
() => {
const pipe = new ReversePipe();
expect(pipe).toBeTruthy();
} | MHL3060/ngx-dynamic-dashboard-framework | projects/ngx-dynamic-dashboard/src/dashboard/toast/reverse.pipe.spec.ts | TypeScript |
FunctionDeclaration |
async function getSources() {
let sources = [];
try {
sources = await callService('material', 'getSourcesByProjectType');
} catch (e) {
Notification.error({
content: intl.formatMessage({ id: 'web.iceworksMaterialHelper.getMaterialError' }),
});
}
return sources;
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
async function refreshSources() {
await callService('material', 'cleanCache');
return await getSources();
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
async function getData(source: string) {
let data = {} as IMaterialData;
try {
data = await callService('material', 'getData', source);
} catch (e) {
Notification.error({ content: intl.formatMessage({ id: 'web.iceworksMaterialHelper.getDataError' }) });
}
console.log('getData', data);
... | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
function validateData({ blocks }) {
if (!blocks.length) {
return intl.formatMessage({ id: 'web.iceworksMaterialHelper.pageGenerater.selectBlocks' });
}
return '';
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
async function onSettingsClick() {
try {
await callService('common', 'openMaterialsSettings');
} catch (e) {
Notification.error({ content: e.message });
}
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
function onAdd(block) {
setSelectedBlocks([...selectedBlocks, block]);
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
function onDelete(targetIndex) {
setSelectedBlocks(selectedBlocks.filter((_, index) => index !== targetIndex));
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
function onNameChange(name, targetIndex) {
selectedBlocks[targetIndex].name = name;
setSelectedBlocks([...selectedBlocks]);
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
function onSortStart() {
setIsSorting(true);
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
function onSortEnd({ oldIndex, newIndex }) {
setIsSorting(false);
setSelectedBlocks([...arrayMove(selectedBlocks, oldIndex, newIndex)]);
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
function onClose() {
setVisible(false);
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
function resetData() {
setSelectedBlocks([]);
setRouterConfig([]);
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
async function handleCreate() {
const errorMessage = validateData({ blocks: selectedBlocks });
if (errorMessage) {
Notification.error({ content: errorMessage });
return;
}
try {
const projectType = await callService('project', 'getProjectType');
const isRouteConfigPathExists = ... | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
async function handleSubmit(values) {
setIsCreating(true);
const { menuType, parent } = values;
let pageIndexPath = '';
try {
const result = await callService('page', 'generate', {
blocks: selectedBlocks,
pageName: values.pageName,
});
pageIndexPath = result.pageIndex... | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
ArrowFunction |
() => {
const intl = useIntl();
const [selectedBlocks, setSelectedBlocks] = useState([]);
const [isSorting, setIsSorting] = useState(false);
const [isCreating, setIsCreating] = useState(false);
const [visible, setVisible] = useState(false);
const [routerConfig, setRouterConfig] = useState<IRouter[]>([]);
... | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
ArrowFunction |
(_, index) => index !== targetIndex | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
ArrowFunction |
(item) => item.path === parent | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
ArrowFunction |
() => {
return (
<LocaleProvider>
<Home />
</LocaleProvider>
);
} | front-end-engineering/iceworks | extensions/iceworks-material-helper/web/src/pages/PageGenerator/index.tsx | TypeScript |
FunctionDeclaration |
export function eightBitLoadFromGBMemory(gameboyOffset: i32): i32 {
return <i32>load<u8>(getWasmBoyOffsetFromGameBoyOffset(gameboyOffset));
} | Malax/wasmBoy | core/memory/load.ts | TypeScript |
FunctionDeclaration |
export function eightBitLoadFromGBMemoryWithTraps(offset: i32): i32 {
let readTrapResult: i32 = checkReadTraps(offset);
switch (readTrapResult) {
case -1:
return eightBitLoadFromGBMemory(offset);
default:
return <u8>readTrapResult;
}
} | Malax/wasmBoy | core/memory/load.ts | TypeScript |
FunctionDeclaration |
export function sixteenBitLoadFromGBMemory(offset: i32): i32 {
// Get our low byte
let lowByte: i32 = 0;
let lowByteReadTrapResult: i32 = checkReadTraps(offset);
switch (lowByteReadTrapResult) {
case -1:
lowByte = eightBitLoadFromGBMemory(offset);
break;
default:
lowByte = lowByteRead... | Malax/wasmBoy | core/memory/load.ts | TypeScript |
FunctionDeclaration |
export function loadBooleanDirectlyFromWasmMemory(offset: i32): boolean {
let booleanAsInt: i32 = load<u8>(offset);
if (booleanAsInt > 0) {
return true;
}
return false;
} | Malax/wasmBoy | core/memory/load.ts | TypeScript |
ArrowFunction |
({
onSubmit,
acceptFiles = 'video/mp4',
}) => {
const { register, handleSubmit } = useForm()
const onSubmitHandler = (data: any) => onSubmit(data.file)
return (
<form role="form" onSubmit={handleSubmit(onSubmitHandler)}>
<input
{...register('file')}
type="file"
data-testid... | termoxin/thermo-english | ui/src/components/FileUploader/file-uploader.tsx | TypeScript |
ArrowFunction |
(data: any) => onSubmit(data.file) | termoxin/thermo-english | ui/src/components/FileUploader/file-uploader.tsx | TypeScript |
MethodDeclaration |
handleSubmit(onSubmitHandler) | termoxin/thermo-english | ui/src/components/FileUploader/file-uploader.tsx | TypeScript |
ArrowFunction |
(
uri: string,
auth?: AuthCredentials,
): ServerOperations => ({
read: () => get<any, Empty>(uri, withCredentials({}, auth)),
uuids: (options?: UuidOptions) =>
get(`${uri}/_uuids`, withCredentials(options || {}, auth)),
activeTasks: () =>
get<Array<ActiveTask>>(`${uri}/_active_tasks`, withCredentials... | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() => get<any, Empty>(uri, withCredentials({}, auth)) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options?: UuidOptions) =>
get(`${uri}/_uuids`, withCredentials(options || {}, auth)) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() =>
get<Array<ActiveTask>>(`${uri}/_active_tasks`, withCredentials({}, auth)) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options?: AllDbOptions) =>
get<Array<string>, AllDbOptions>(
`${uri}/_all_dbs`,
withCredentials(options || {}, auth),
) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options?: DbUpdateOptions) =>
get<DbUpdateResult, DbUpdateOptions>(
`${uri}/_db_updates`,
withCredentials(options || {}, auth),
) | bmartel/sauxfas | src/server.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.