type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
adBreak => adBreak.type === AdBreakType.POSTROLL && !adBreak.hasBeenWatched
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
InterfaceDeclaration
interface IFWAdBreak extends IAdBreak { maxAds: number; freewheelSlot?: any; }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
public onControllerPlay(next: NextHook) { if (!this.adsRequested) { this.emit(Events.ADBREAK_STATE_PLAY); this.adContext.submitRequest(); return; } if (this.currentAdBreak) { this.emit(Events.ADBREAK_STATE_PLAY); this.mediaElement.play(); return; } next(); }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
public onControllerPause(next: NextHook) { if (this.currentAdBreak) { this.emit(Events.ADBREAK_STATE_PAUSE); this.mediaElement.pause(); return; } next(); }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
public onControllerSetVolume(next: NextHook, volume: number) { this.mediaElement.volume = volume; this.mediaElement.muted = volume === 0; next(); }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
public onControllerSeekTo(next: NextHook) { if (this.currentAdBreak) { return; } next(); }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
public createMediaElement() { this.mediaElement = document.createElement('video'); this.mediaElement.style.width = '100%'; this.mediaElement.style.height = '100%'; this.mediaElement.addEventListener('playing', () => { this.emit(Events.ADBREAK_STATE_PLAYING); }); this.mediaElement.addEve...
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
private onInstanceInitialized() { this.adContainer = document.createElement('div'); this.adContainer.style.position = 'absolute'; this.adContainer.style.left = '0px'; this.adContainer.style.right = '0px'; this.adContainer.style.top = '0px'; this.adContainer.style.bottom = '0px'; this.adCont...
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
public onAdRequestComplete(event) { this.adsRequested = true; if (event.success) { const slots = this.adContext.getTemporalSlots(); this.adBreaks = slots.map( (slot, index) => ({ sequenceIndex: index, id: slot.getCustomId(), type: slot.getAdUni...
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
public adClick() { if (!this.currentAd) { return; } this.currentAd.freewheelAdInstance .getRendererController() .processEvent({ name: this.sdk.EVENT_AD_CLICK }); }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
private onSlotStarted(event) { const slot: any = event.slot; const adBreak = this.slotToAdBreak(slot); this.currentAdBreak = adBreak; this.emit(Events.ADBREAK_STARTED, { adBreak, } as IAdBreakEventData); this.instance.media.pause(); }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
private onSlotEnded(event) { const slot: any = event.slot; const adBreak = this.slotToAdBreak(slot); adBreak.hasBeenWatched = true; this.currentAdBreak = null; this.emit(Events.ADBREAK_ENDED, { adBreak, } as IAdBreakEventData); if (adBreak.type !== AdBreakType.POSTROLL) { th...
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
private onAdImpression(event) { this.adSequenceIndex = 0; this.currentAd = { sequenceIndex: this.adSequenceIndex, freewheelAdInstance: event.adInstance, }; this.emit(Events.AD_STARTED, { adBreak: this.currentAdBreak, ad: this.currentAd, } as IAdEventData); }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
private onAdImpressionEnd(event) { const ad = this.currentAd; this.currentAd = null; this.emit(Events.AD_ENDED, { adBreak: this.currentAdBreak, ad, } as IAdEventData); this.adSequenceIndex += 1; }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
private onPlayerTimeUpdate({ currentTime }: ITimeUpdateEventData) { const midroll: IFWAdBreak = find( this.adBreaks, adBreak => adBreak.type === AdBreakType.MIDROLL && adBreak.startsAt <= currentTime && adBreak.startsAt > this.prevCurrentTime && !adBreak.hasBeenWatched, ...
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
private onPlayerEnded() { const postroll: IFWAdBreak = find( this.adBreaks, adBreak => adBreak.type === AdBreakType.POSTROLL && !adBreak.hasBeenWatched, ); if (postroll) { this.playAdBreak(postroll); } }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
private slotToAdBreak(slot: any): IFWAdBreak { return find<IFWAdBreak>(this.adBreaks, { id: slot.getCustomId(), }); }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
private playAdBreak(adBreak: IFWAdBreak) { try { adBreak.freewheelSlot.play(); } catch (error) { this.instance.media.play(); } this.adContainer.style.display = 'block'; }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
MethodDeclaration
private shouldSkipPreroll() { return this.instance.config.startPosition > 0; }
JamoDevNich/indigo-player
src/extensions/FreeWheelExtension/FreeWheelExtension.ts
TypeScript
ArrowFunction
params => { if (params['term']) { this.help = params['term']; //automat ponizsze zakomentowac this.doSearch(this.help); } }
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
ArrowFunction
term => this.onSearch(term)
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
ArrowFunction
() => this.loading = true
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
ArrowFunction
term => this.itunes.search2(term)
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
ArrowFunction
() => this.loading = false
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
ClassDeclaration
// https://codecraft.tv/courses/angular/http/http-with-promises/ @Component({ selector: 'app-tune', templateUrl: './app-tune.component.html', styleUrls: ['./app-tune.component.scss'], }) export class AppTuneComponent implements OnInit { private loading = false; // private results: SearchItem[]; private resu...
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
MethodDeclaration
ngOnInit() { this.searchField = new FormControl(); this.searchField.setValue(this.help); //automat // this.search(); }
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
MethodDeclaration
ngOnDestroy(){ this.itunes.clear(); }
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
MethodDeclaration
search() { this.cd.reattach(); this.results = this.searchField.valueChanges .debounceTime(400) .distinctUntilChanged() .do(term => this.onSearch(term)) .do( () => this.loading = true) .switchMap( term => this.itunes.search2(term)) .do( () => this.loading = false ); }
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
MethodDeclaration
doSearch(term: string) { this.loading = true; this.itunes.search(term).then(() => this.loading = false); }
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
MethodDeclaration
doSearch2(term: string) { this.itunes.search2(term); }
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
MethodDeclaration
goHome() { this.router.navigate(['']); }
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
MethodDeclaration
goTune() { this.router.navigate(['tune']); }
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
MethodDeclaration
onSearch(term: string) { this.router.navigate(['tune', {term: term}]); }
psmuga/AngularContainer
src/app/components/app-tune/app-tune.component.ts
TypeScript
ArrowFunction
props => ( <svg width="24"
Simspace/monorail
src/visualComponents/icon/custom/EssayDefault.tsx
TypeScript
FunctionDeclaration
function getURI(message: Message) { var url = getURL(message); var uri = url.split('https://open.spotify.com/track/')[1].split('?')[0]; return `spotify:track:${uri}`; }
hemant-hari/BoToxic
src/listeners/spotify/enqueue.ts
TypeScript
FunctionDeclaration
function getURL(message: Message) { var spotifyRegex = /https?:\/\/open\.spotify\.com\/track\/\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi; return message.content.match(spotifyRegex)[0]; }
hemant-hari/BoToxic
src/listeners/spotify/enqueue.ts
TypeScript
FunctionDeclaration
async function enqueueTrack(reaction: MessageReaction, api: SpotifyWebApi) { var accessToken = api.getAccessToken(); return ( WebApiRequest.builder(accessToken) .withPath('/v1/me/player/queue') .withHeaders({ 'Content-Type': 'application/json' }) .withQueryParameters...
hemant-hari/BoToxic
src/listeners/spotify/enqueue.ts
TypeScript
ArrowFunction
async () => enqueueTrack(reaction, api)
hemant-hari/BoToxic
src/listeners/spotify/enqueue.ts
TypeScript
ArrowFunction
(appendToObject: JQuery) => { var nSeries: number = (!this.xData ? 0 : this.xData.length); var s: StyleChart = this.getStyle(); var margin: Margin = Style.getMargins(s); // Set the ranges var xScale: d3.scale.Linear<number,number> = d3.scale.linear().range([0, margin.widthExMa...
A-Hilaly/deeplearning4j
deeplearning4j-ui-parent/deeplearning4j-ui-components/src/main/typescript/org/deeplearning4j/ui/components/chart/ChartStackedArea.ts
TypeScript
ClassDeclaration
/* * * * Copyright 2016 Skymind,Inc. * * * * 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 * * * * U...
A-Hilaly/deeplearning4j
deeplearning4j-ui-parent/deeplearning4j-ui-components/src/main/typescript/org/deeplearning4j/ui/components/chart/ChartStackedArea.ts
TypeScript
ArrowFunction
async () => { const { authority } = await this.remoteAuthorityResolverService.resolveAuthority(this._initDataProvider.remoteAuthority); return { host: authority.host, port: authority.port, connectionToken: authority.connectionToken }; }
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
(resolverResult) => { const startParams: IRemoteExtensionHostStartParams = { language: platform.language, debugId: this._environmentService.debugExtensionHost.debugId, break: this._environmentService.debugExtensionHost.break, port: this._environmentService.debugExtensionHost.port, env: resolver...
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
result => { let { protocol, debugPort } = result; const isExtensionDevelopmentDebug = typeof debugPort === 'number'; if (debugOk && this._environmentService.isExtensionDevelopment && this._environmentService.debugExtensionHost.debugId && debugPort) { this._extensionHostDebugService.attachSession(this....
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
() => { this._onExtHostConnectionLost(); }
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
() => { if (this._isExtensionDevHost) { this._onExtHostConnectionLost(); } }
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
(resolve, reject) => { let handle = setTimeout(() => { reject('timeout'); }, 60 * 1000); let logFile: URI; const disposable = protocol.onMessage(msg => { if (isMessageOfType(msg, MessageType.Ready)) { // 1) Extension Host is ready to receive messages, initialize it thi...
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
() => { reject('timeout'); }
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
msg => { if (isMessageOfType(msg, MessageType.Ready)) { // 1) Extension Host is ready to receive messages, initialize it this._createExtHostInitData(isExtensionDevelopmentDebug).then(data => { logFile = data.logFile; protocol.send(VSBuffer.fromString(JSON.stringify(data))); ...
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
data => { logFile = data.logFile; protocol.send(VSBuffer.fromString(JSON.stringify(data))); }
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
(extension) => remoteExtensions.add(ExtensionIdentifier.toKey(extension.identifier.value))
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
extension => !extension.main && !extension.browser
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
extension => extension.identifier
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
extension => !remoteExtensions.has(ExtensionIdentifier.toKey(extension.identifier.value))
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
extension => (extension.main || extension.browser) && extension.api === 'none'
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
InterfaceDeclaration
export interface IRemoteExtensionHostInitData { readonly connectionData: IRemoteConnectionData | null; readonly pid: number; readonly appRoot: URI; readonly extensionHostLogsPath: URI; readonly globalStorageHome: URI; readonly workspaceStorageHome: URI; readonly extensions: IExtensionDescription[]; readonly al...
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
InterfaceDeclaration
export interface IRemoteExtensionHostDataProvider { readonly remoteAuthority: string; getInitData(): Promise<IRemoteExtensionHostInitData>; }
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
MethodDeclaration
public start(): Promise<IMessagePassingProtocol> { const options: IConnectionOptions = { commit: this._productService.commit, socketFactory: this._socketFactory, addressProvider: { getAddress: async () => { const { authority } = await this.remoteAuthorityResolverService.resolveAuthority(this._initD...
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
MethodDeclaration
private _onExtHostConnectionLost(): void { if (this._hasLostConnection) { // avoid re-entering this method return; } this._hasLostConnection = true; if (this._isExtensionDevHost && this._environmentService.debugExtensionHost.debugId) { this._extensionHostDebugService.close(this._environmentService.de...
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
MethodDeclaration
private async _createExtHostInitData(isExtensionDevelopmentDebug: boolean): Promise<IInitData> { const [telemetryInfo, remoteInitData] = await Promise.all([this._telemetryService.getTelemetryInfo(), this._initDataProvider.getInitData()]); // Collect all identifiers for extension ids which can be considered "resol...
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
MethodDeclaration
getInspectPort(): number | undefined { return undefined; }
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
MethodDeclaration
enableInspectPort(): Promise<boolean> { return Promise.resolve(false); }
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
MethodDeclaration
override dispose(): void { super.dispose(); this._terminating = true; if (this._protocol) { // Send the extension host a request to terminate itself // (graceful termination) const socket = this._protocol.getSocket(); this._protocol.send(createMessageOfType(MessageType.Terminate)); this._protoco...
02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts
TypeScript
ArrowFunction
() => { it("should generate enums", () => { const code = new main.Code({ lines: 31, language: main.Code.Language.CPP, }); const transferredCode = main.Code.deserialize(code.serialize()); expect(transferredCode.toObject()).toEqual({ lines: 31, language: main.Code.Lan...
EchoZhaoH/protoc-gen-ts
test/enum_within_message.spec.ts
TypeScript
ArrowFunction
() => { const code = new main.Code({ lines: 31, language: main.Code.Language.CPP, }); const transferredCode = main.Code.deserialize(code.serialize()); expect(transferredCode.toObject()).toEqual({ lines: 31, language: main.Code.Language.CPP, }); }
EchoZhaoH/protoc-gen-ts
test/enum_within_message.spec.ts
TypeScript
ArrowFunction
(props: IEmojiProps) => ( <svg viewBox="0 0 72 72"
react-pakistan/react-emoji-collection
src/people-body/family/Family43.tsx
TypeScript
FunctionDeclaration
function parse(input: string): Package | never { if (!input) { throw Error('Name cannot be an empty value'); } const {scope, name, version}: Package = grammar.parse(input); if (!scope) { if (blacklist.includes(name)) { throw Error('Name cannot contain blacklisted names'); ...
pobedit-instruments/package-name-parser
src/parser.ts
TypeScript
TypeAliasDeclaration
type Package = { scope?: string; name: string; version?: { basic: string; comparator?: string; preRelease?: string; buildMetadata?: string; original: string; } };
pobedit-instruments/package-name-parser
src/parser.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-header', templateUrl: './header.component.html', styleUrls: ['./header.component.scss'], }) export class HeaderComponent implements OnInit { constructor(private router: Router) {} ngOnInit() {} onClick(link: string) { this.router.navigateByUrl(link); } }
heavenshell/ts-angular
src/app/components/organisms/header/header.component.ts
TypeScript
MethodDeclaration
onClick(link: string) { this.router.navigateByUrl(link); }
heavenshell/ts-angular
src/app/components/organisms/header/header.component.ts
TypeScript
InterfaceDeclaration
export interface NewUser { role: string; email: string; username: string; firstName: string; lastName: string; avatarUrl: string; uId: string; providerName: Providers; providerUrl: string; accessToken: string; }
BinaryStudioAcademy/bsa-2020-buildeR
frontend/src/app/shared/models/user/new-user.ts
TypeScript
ArrowFunction
() => { console.log('Server started at: ' + server.info.uri); }
0-Captain/DefinitelyTyped
types/hapi/test/server/server-stop.ts
TypeScript
ArrowFunction
() => { console.log('Server stoped.'); }
0-Captain/DefinitelyTyped
types/hapi/test/server/server-stop.ts
TypeScript
ArrowFunction
() => { server.stop({ timeout: 10 * 1000 }); }
0-Captain/DefinitelyTyped
types/hapi/test/server/server-stop.ts
TypeScript
FunctionDeclaration
/** * Renders code tag with highlighting based on requested language. */ function CodeTag({ language, value }: CodeTagProps): ReactElement { // language is explicitly null; don't highlight if (language === null) { return <code>{value}</code> } // no language provided; we'll default to python if (langua...
0phoff/streamlit
frontend/src/components/elements/CodeBlock/CodeBlock.tsx
TypeScript
FunctionDeclaration
/** * Renders a code block with syntax highlighting, via Prismjs */ export default function CodeBlock({ language, value, }: CodeBlockProps): ReactElement { return ( <StyledCodeBlock className="stCodeBlock"> {value && ( <StyledCopyButtonContainer> <CopyButton text={value} /> <...
0phoff/streamlit
frontend/src/components/elements/CodeBlock/CodeBlock.tsx
TypeScript
InterfaceDeclaration
interface CodeTagProps { language?: string | null value: string }
0phoff/streamlit
frontend/src/components/elements/CodeBlock/CodeBlock.tsx
TypeScript
InterfaceDeclaration
export interface CodeBlockProps extends CodeTagProps {}
0phoff/streamlit
frontend/src/components/elements/CodeBlock/CodeBlock.tsx
TypeScript
InterfaceDeclaration
declare interface Window { getCurrentWindow: Electron.Remote['getCurrentWindow']; platform: NodeJS.Platform; }
Losses/electron-with-cra-ts
common.d.ts
TypeScript
ArrowFunction
({ user, workspace, module, isAuthor, setInboxOpen, inboxOpen, expire, signature, setModule, fetchDrafts, }) => { const [isEditing, setIsEditing] = useState(false) const [addAuthors, setAddAuthors] = useState(false) const [addParentMutation] = useMutation(addParent) const [moduleEdit, { re...
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
async (values) => { const updatedModule = await editModuleScreenMutation({ id: moduleEdit?.id, typeId: parseInt(values.type), title: values.title, description: values.description, licenseId: parseInt(values.license), }) setQueryData(updatedModule) setIsEd...
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
() => { formik.setFieldValue("type", moduleEdit!.type.id.toString()) formik.setFieldValue("title", moduleEdit!.title) formik.setFieldValue("description", moduleEdit!.description) formik.setFieldValue("license", moduleEdit!.license!.id.toString()) }
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(author) => author.workspace?.handle === workspace.handle
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(author) => author.readyToPublish !== true
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(data) => { setQueryData(data) return "Version approved for publication" }
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(data) => { setQueryData(data) return `Linked to: "${item.name}"` }
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(data) => { toast.promise( addParentMutation({ currentId: module?.id, connectId: data.id, }), ...
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(info) => { setQueryData(info) return `Linked to: "${data.title}"` }
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(file) => ( <> <EditSupportingFileDisplay name={file.original_filename}
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(data) => { setQueryData(data) return "Added reference!" }
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(data) => { toast.promise( addReferenceMutation({ currentId: moduleEdit?.id, connectId: data.id, }), ...
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(data) => { setQueryData(data) return "Added reference!" }
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(reference) => ( <> <li> <button className="mx-2"> <TrashCan24 className
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(data) => { setQueryData(data) return `Removed reference: "${reference.title}"` }
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(author, index) => ( <> <Link href={Routes.HandlePage({ handle: author!.workspace!.handle })}> <a target
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
ArrowFunction
(author, index) => ( <> {index === 3 ? "[...]" : index > 3 ? "" : author.given && author.family ? `${...
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
MethodDeclaration
file<
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
MethodDeclaration
inboxOpen ? ( <button onClick={() => { setInboxOpen
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
MethodDeclaration
async onSelect(params) { const { item, setQuery } = params toast.promise( addParentMutation({ currentId: module?.id, connectId: item.objectID, }), { ...
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
MethodDeclaration
getItems() { return getAlgoliaResults({ searchClient, queries: [ { indexName: `${process.env.ALGOLIA_PREFIX}_modules`, query, }, ...
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript
MethodDeclaration
item({ item, components }) { // TODO: Need to update search results per Algolia index return <SearchResultModule item={item} /> }
egonw/ResearchEquals.com
app/modules/components/ModuleEdit.tsx
TypeScript