type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
handleNode(ref: FormattedNodeRef, item: SerializedNode): FormattedNode {
return formatNode(wo.data, item, ref, collector);
} | code-to-json/code-to-json | packages/formatter/src/formatter.ts | TypeScript |
TypeAliasDeclaration |
export declare type RewardChainBlockUnfinished = {
total_iters: uint128;
signage_point_index: uint8;
pos_ss_cc_challenge_hash: bytes32;
proof_of_space: ProofOfSpace;
challenge_chain_sp_vdf: Optional<VDFInfo>;
challenge_chain_sp_signature: G2Element;
reward_chain_sp_vdf: Optional<VDFI... | tranquilo/chia-agent | dist/api/chia/types/blockchain_format/reward_chain_block.d.ts | TypeScript |
TypeAliasDeclaration |
export declare type RewardChainBlock = {
weight: uint128;
height: uint32;
total_iters: uint128;
signage_point_index: uint8;
pos_ss_cc_challenge_hash: bytes32;
proof_of_space: ProofOfSpace;
challenge_chain_sp_vdf: Optional<VDFInfo>;
challenge_chain_sp_signature: G2Element;
c... | tranquilo/chia-agent | dist/api/chia/types/blockchain_format/reward_chain_block.d.ts | TypeScript |
ArrowFunction |
({ shareUrl, placement, text, title, imageUrl }) => {
const options = { shareUrl: process.env.SITE_URL + '/' + shareUrl };
const IconProps = {
size: 40,
iconFillColor: 'var(--slate-dark)',
bgStyle: { fill: 'none' }
};
const shareContent = title;
return (
<>
<div className="flex p-2 text-ac-slate-dark ... | bcc-code/bcc-AC-bitbucket-clone | src/components/QuoteImage/ShareQuote.tsx | TypeScript |
InterfaceDeclaration |
interface IProps {
imageUrl: string;
shareUrl: string;
text?: string;
title?: string;
placement?: 'top' | 'right';
offSetBottom?: number;
} | bcc-code/bcc-AC-bitbucket-clone | src/components/QuoteImage/ShareQuote.tsx | TypeScript |
ClassDeclaration | /// Model ///
export class Car {
name = 'Avocado Motors';
constructor(public engine: Engine, public tires: Tires) { }
get description() {
return `${this.name} car with ` +
`${this.engine.cylinders} cylinders and ${this.tires.make} tires.`;
}
} | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
ClassDeclaration |
export class Engine {
cylinders = 4;
} | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
ClassDeclaration |
export class Tires {
make = 'Flintstone';
model = 'Square';
} | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
ClassDeclaration | //// Engine services ///
@Injectable({
providedIn: 'root'
})
export class EngineService {
id = 'E1';
getEngine() { return new Engine(); }
} | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
ClassDeclaration |
@Injectable({
providedIn: 'root'
})
export class EngineService2 {
id = 'E2';
getEngine() {
const eng = new Engine();
eng.cylinders = 8;
return eng;
}
} | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
ClassDeclaration | //// Tire services ///
@Injectable({
providedIn: 'root'
})
export class TiresService {
id = 'T1';
getTires() { return new Tires(); }
} | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
ClassDeclaration | /// Car Services ///
@Injectable({
providedIn: 'root'
})
export class CarService {
id = 'C1';
constructor(
protected engineService: EngineService,
protected tiresService: TiresService) { }
getCar() {
return new Car(
this.engineService.getEngine(),
this.tiresService.getTires());
}
... | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
ClassDeclaration |
@Injectable({
providedIn: 'root'
})
export class CarService2 extends CarService {
override id = 'C2';
constructor(
protected override engineService: EngineService,
protected override tiresService: TiresService) {
super(engineService, tiresService);
}
override getCar() {
const car = super.ge... | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
ClassDeclaration |
@Injectable({
providedIn: 'root'
})
export class CarService3 extends CarService2 {
override id = 'C3';
constructor(
protected override engineService: EngineService,
protected override tiresService: TiresService) {
super(engineService, tiresService);
}
override getCar() {
const car = super.g... | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
MethodDeclaration |
getEngine() { return new Engine(); } | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
MethodDeclaration |
getEngine() {
const eng = new Engine();
eng.cylinders = 8;
return eng;
} | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
MethodDeclaration |
getTires() { return new Tires(); } | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
MethodDeclaration |
getCar() {
return new Car(
this.engineService.getEngine(),
this.tiresService.getTires());
} | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
MethodDeclaration |
override getCar() {
const car = super.getCar();
car.name = 'BamBam Motors, BroVan 2000';
return car;
} | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
MethodDeclaration |
override getCar() {
const car = super.getCar();
car.name = 'Chizzamm Motors, Calico UltraMax Supreme';
return car;
} | 017-Ddas/angular | aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts | TypeScript |
ArrowFunction |
(areaType: AreaType) => {
if (areaType === AreaType.PRODUCT_AREA) return "#CDE7D8"
else if (areaType === AreaType.IT) return "#CCE1F3"
else if (areaType === AreaType.PROJECT) return "#ECEFCC"
else return "#E0DAE7"
} | navikt/team-catalog | apps/frontend/src/components/ProductArea/View/ProductAreaCard.tsx | TypeScript |
ArrowFunction |
(areaType: AreaType, hover: boolean) => {
return {
Root: {
style: () => {
const base = {
backgroundColor: cardBackgroundColor(areaType),
width: '100%',
margin: theme.sizing.scale200,
}
return hover ? {
...base,
...borderColor(primiti... | navikt/team-catalog | apps/frontend/src/components/ProductArea/View/ProductAreaCard.tsx | TypeScript |
ArrowFunction |
() => {
const base = {
backgroundColor: cardBackgroundColor(areaType),
width: '100%',
margin: theme.sizing.scale200,
}
return hover ? {
...base,
...borderColor(primitives.primary350)
,
boxShadow: '0px 4px 2px -1px rgba(0,0,0,... | navikt/team-catalog | apps/frontend/src/components/ProductArea/View/ProductAreaCard.tsx | TypeScript |
ArrowFunction |
() => {
return {
marginBottom: 0
}
} | navikt/team-catalog | apps/frontend/src/components/ProductArea/View/ProductAreaCard.tsx | TypeScript |
ArrowFunction |
() => {
return {
...marginAll(theme.sizing.scale500)
}
} | navikt/team-catalog | apps/frontend/src/components/ProductArea/View/ProductAreaCard.tsx | TypeScript |
ArrowFunction |
(props: {teams: number, people: number}) => (
<Block display="flex">
<Block display | navikt/team-catalog | apps/frontend/src/components/ProductArea/View/ProductAreaCard.tsx | TypeScript |
ArrowFunction |
(props: ProductAreaCardProps) => {
const [hover, setHover] = useState(false)
return (
<div onMouseEnter={() | navikt/team-catalog | apps/frontend/src/components/ProductArea/View/ProductAreaCard.tsx | TypeScript |
TypeAliasDeclaration |
type ProductAreaCardProps = {
title: string
areaType: AreaType
teamSummary?: ProductAreaSummary
} | navikt/team-catalog | apps/frontend/src/components/ProductArea/View/ProductAreaCard.tsx | TypeScript |
ClassDeclaration |
@Module({
imports: [
PublicModules.PASSPORT_MODULE,
],
controllers: [TagNameController],
providers: [TagNameService]
})
export class TagNameModule {} | vietnq-dgh/BE-NestJS-Base | src/modules/tag-name/tag-name.module.ts | TypeScript |
FunctionDeclaration |
function formatShareInvitations(invitations: any[]): ShareInvitation[] {
return invitations.map(inv => {
return {
...inv,
master_key: inv.master_key ? JSON.parse(inv.master_key) : null,
};
});
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
inv => {
return {
...inv,
master_key: inv.master_key ? JSON.parse(inv.master_key) : null,
};
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
() => Setting.value(`sync.${syncTargetId}.path`) | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
() => Setting.value(`sync.${syncTargetId}.userContentPath`) | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
() => Setting.value(`sync.${syncTargetId}.username`) | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
() => Setting.value(`sync.${syncTargetId}.password`) | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
s => s.folder_id === folderId | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
s => s.note_id === noteId | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
s => !!s.note_id | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
s => s.note_id | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
m => m.id === masterKeyId | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
s => s.id === id | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
async (shares: StateShare[]) => {
const output: Record<string, StateShare> = {};
for (const share of shares) {
if (ids.includes(share.id)) output[share.id] = share;
}
return output;
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
share => share.id | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
ArrowFunction |
si => si.share.id | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
InterfaceDeclaration |
export interface ApiShare {
id: string;
master_key_id: string;
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public static instance(): ShareService {
if (this.instance_) return this.instance_;
this.instance_ = new ShareService();
return this.instance_;
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public initialize(store: Store<any>, encryptionService: EncryptionService, api: JoplinServerApi = null) {
this.initialized_ = true;
this.store_ = store;
this.encryptionService_ = encryptionService;
this.api_ = api;
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
private api(): JoplinServerApi {
if (this.api_) return this.api_;
const syncTargetId = Setting.value('sync.target');
this.api_ = new JoplinServerApi({
baseUrl: () => Setting.value(`sync.${syncTargetId}.path`),
userContentBaseUrl: () => Setting.value(`sync.${syncTargetId}.userContentPath`),
username: (... | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async shareFolder(folderId: string): Promise<ApiShare> {
const folder = await Folder.load(folderId);
if (!folder) throw new Error(`No such folder: ${folderId}`);
let folderMasterKey: MasterKeyEntity = null;
if (getEncryptionEnabled()) {
const syncInfo = localSyncInfo();
// Shouldn't happen
i... | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration | // This allows the notebook owner to stop sharing it. For a recipient to
// leave the shared notebook, see the leaveSharedFolder command.
public async unshareFolder(folderId: string) {
const folder = await Folder.load(folderId);
if (!folder) throw new Error(`No such folder: ${folderId}`);
const share = this.shar... | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration | // This is when a share recipient decides to leave the shared folder.
//
// In that case, we should only delete the folder but none of its children.
// Deleting the folder tells the server that we want to leave the share. The
// server will then proceed to delete all associated user_items. So
// eventually all the note... | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async shareNote(noteId: string): Promise<StateShare> {
const note = await Note.load(noteId);
if (!note) throw new Error(`No such note: ${noteId}`);
const share = await this.api().exec('POST', 'api/shares', {}, { note_id: noteId });
await Note.save({
id: note.id,
parent_id: note.parent_id,
is_... | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async unshareNote(noteId: string) {
const note = await Note.load(noteId);
if (!note) throw new Error(`No such note: ${noteId}`);
const shares = await this.refreshShares();
const noteShares = shares.filter(s => s.note_id === noteId);
const promises: Promise<void>[] = [];
for (const share of noteSh... | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public shareUrl(userId: string, share: StateShare): string {
return `${this.api().personalizedUserContentBaseUrl(userId)}/shares/${share.id}`;
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public folderShare(folderId: string): StateShare {
return this.shares.find(s => s.folder_id === folderId);
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public isSharedFolderOwner(folderId: string, userId: string = null): boolean {
if (userId === null) userId = this.userId;
const share = this.folderShare(folderId);
if (!share) throw new Error(`Cannot find share associated with folder: ${folderId}`);
return share.user.id === userId;
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
private async userPublicKey(userEmail: string): Promise<PublicPrivateKeyPair> {
return this.api().exec('GET', `api/users/${encodeURIComponent(userEmail)}/public_key`);
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async addShareRecipient(shareId: string, masterKeyId: string, recipientEmail: string) {
let recipientMasterKey: MasterKeyEntity = null;
if (getEncryptionEnabled()) {
const syncInfo = localSyncInfo();
const masterKey = syncInfo.masterKeys.find(m => m.id === masterKeyId);
if (!masterKey) throw new E... | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async deleteShareRecipient(shareUserId: string) {
await this.api().exec('DELETE', `api/share_users/${shareUserId}`);
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async deleteShare(shareId: string) {
await this.api().exec('DELETE', `api/shares/${shareId}`);
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
private async loadShares() {
return this.api().exec('GET', 'api/shares');
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
private async loadShareUsers(shareId: string) {
return this.api().exec('GET', `api/shares/${shareId}/users`);
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
private async loadShareInvitations() {
return this.api().exec('GET', 'api/share_users');
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public setProcessingShareInvitationResponse(v: boolean) {
this.store.dispatch({
type: 'SHARE_INVITATION_RESPONSE_PROCESSING',
value: v,
});
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async respondInvitation(shareUserId: string, masterKey: MasterKeyEntity, accept: boolean) {
logger.info('respondInvitation: ', shareUserId, accept);
if (accept) {
if (masterKey) {
const reencryptedMasterKey = await mkReencryptFromPublicKeyToPassword(
this.encryptionService_,
masterKey,
... | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async refreshShareInvitations() {
const result = await this.loadShareInvitations();
const invitations = formatShareInvitations(result.items);
logger.info('Refresh share invitations:', invitations);
this.store.dispatch({
type: 'SHARE_INVITATION_SET',
shareInvitations: invitations,
});
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async shareById(id: string) {
const stateShare = this.state.shares.find(s => s.id === id);
if (stateShare) return stateShare;
const refreshedShares = await this.refreshShares();
const refreshedShare = refreshedShares.find(s => s.id === id);
if (!refreshedShare) throw new Error(`Could not find share w... | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration | // In most cases the share objects will already be part of the state, so
// this function checks there first. If the required share objects are not
// present, it refreshes them from the API.
public async sharesByIds(ids: string[]) {
const buildOutput = async (shares: StateShare[]) => {
const output: Record<string... | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async refreshShares(): Promise<StateShare[]> {
const result = await this.loadShares();
logger.info('Refreshed shares:', result);
this.store.dispatch({
type: 'SHARE_SET',
shares: result.items,
});
return result.items;
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async refreshShareUsers(shareId: string) {
const result = await this.loadShareUsers(shareId);
logger.info('Refreshed share users:', result);
this.store.dispatch({
type: 'SHARE_USER_SET',
shareId: shareId,
shareUsers: result.items,
});
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
private async updateNoLongerSharedItems() {
const shareIds = this.shares.map(share => share.id).concat(this.shareInvitations.map(si => si.share.id));
await Folder.updateNoLongerSharedItems(shareIds);
} | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
MethodDeclaration |
public async maintenance() {
if (this.enabled) {
let hasError = false;
try {
await this.refreshShareInvitations();
await this.refreshShares();
Setting.setValue('sync.userId', this.api().userId);
} catch (error) {
hasError = true;
logger.error('Failed to run maintenance:', error);
}
... | CalebJohn/joplin | packages/lib/services/share/ShareService.ts | TypeScript |
InterfaceDeclaration |
export interface IGrid
extends Interface.IBuilder,
Interface.IDisposable,
Interface.ISearchById,
Feature.IView {
addedRows: Event.Grid.AddNewRowEvent;
autoGenerate: boolean;
config: Configuration.IConfigurationGrid;
dataSource: Grid.IDataSourc... | OutSystems/outsystems-datagrid-reactive | code/src/OSFramework/Grid/IGrid.ts | TypeScript |
FunctionDeclaration |
function renderAbout(): string {
const sheet = new ServerStyleSheet();
const about = ReactDOMServer.renderToStaticMarkup(
<StyleSheetManager sheet={sheet.instance}>
<About
packageJson={packageJson}
versions={process.versions}
version={app.getVersion()}
/>
</StyleSheetMan... | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
FunctionDeclaration |
function openAbout() {
const about = renderAbout();
const aboutWindow = new BrowserWindow({
width: 400,
height: 460,
useContentSize: true,
titleBarStyle: 'hiddenInset',
});
aboutWindow.loadURL(`data:text/html;charset=utf-8,${about}`);
aboutWindow.webContents.on('will-navigate', (e, url) => ... | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
(e, url) => {
e.preventDefault();
shell.openExternal(url);
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
openedWindows.delete(aboutWindow);
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
const gotTheLock = app.requestSingleInstanceLock();
if (!gotTheLock) {
console.log('Second instance. Quitting.');
app.quit();
return false;
}
app.on('second-instance', (event, commandLine, workingDirectory) => {
// Someone tried to run a second instance, we should focus... | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
(event, commandLine, workingDirectory) => {
// Someone tried to run a second instance, we should focus our window.
if (mainWindow) {
if (mainWindow.isMinimized()) {
mainWindow.restore();
}
mainWindow.focus();
}
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
// check that the app is either packaged or running in the python venv
if (!chiaEnvironment.guessPackaged() && !('VIRTUAL_ENV' in process.env)) {
console.log('App must be installed or in venv');
app.quit();
return false;
}
return true;
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
(e) => {} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
decidedToClose = false;
mainWindow = new BrowserWindow({
width: 1200,
height: 1200,
minWidth: 500,
minHeight: 500,
backgroundColor: '#ffffff',
show: false,
webPreferences: {
preload: `${__dirname}/preload.js`,
nodeIntegrati... | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
mainWindow.show();
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
mainWindow.setTitle(`${app.getName()} [${global.daemon_rpc_ws}]`);
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
(e) => {
// if the daemon isn't local we aren't going to try to start/stop it
if (decidedToClose || !chiaConfig.manageDaemonLifetime()) {
return;
}
e.preventDefault();
if (!isClosing) {
isClosing = true;
const choice = dialog.showMessageBoxSync({
... | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
(event, args) => {
mainWindow.close();
openedWindows.forEach((win) => win.close());
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
(win) => win.close() | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => Menu.buildFromTemplate(getMenuTemplate()) | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
async () => {
createWindow();
app.applicationMenu = createMenu();
// if the daemon isn't local we aren't going to try to start/stop it
if (chiaConfig.manageDaemonLifetime()) {
chiaEnvironment.startChiaDaemon();
}
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
app.quit();
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
(_, arg: { file: string; query: string }) => {
mainWindow.loadURL(
require('url').format({
pathname: path.join(__dirname, arg.file),
protocol: 'file:',
slashes: true,
}) + arg.query,
);
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
(_, locale = 'en-US') => {
i18n.activate(locale);
app.applicationMenu = createMenu();
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
const template = [
{
label: i18n._(/* i18n */ { id: 'File' }),
submenu: [
{
role: 'quit',
},
],
},
{
label: i18n._(/* i18n */ { id: 'Edit' }),
submenu: [
{
role: 'undo',
},
{
... | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => mainWindow.toggleDevTools() | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => mainWindow.setFullScreen(!mainWindow.isFullScreen()) | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
openExternal(
'https://github.com/silicoin-network/silicoin-blockchain/wiki',
);
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
openExternal(
'https://github.com/silicoin-network/silicoin-blockchain/wiki/FAQ',
);
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
openExternal(
'https://github.com/silicoin-network/silicoin-blockchain/releases',
);
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
openExternal(
'https://github.com/silicoin-network/silicoin-blockchain/blob/master/CONTRIBUTING.md',
);
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
ArrowFunction |
() => {
openExternal(
'https://www.chia-hub.com',
);
} | silicoin-network/silicoin-blockchain-gui | src/electron/main.tsx | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.