type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
(c) => c.title === "Blog"
UncleSamSwiss/iobroker-dev-portal
express/frontend/src/components/Dashboard.tsx
TypeScript
ArrowFunction
async (repo?: string) => { setShowAddWatch(false); if (!repo) { return; } try { setCategories((old) => ({ ...old, [WATCHED_ADAPTERS_CATEGORY]: { cards: [] }, })); // show spinner const url = getApiUrl("user"); const { data: dbUser } = await axios.get<DbUser>(url); dbUser.watches.push(repo); await axios.put(url, dbUser); onAdapterListChanged(); await loadWatchedAdapters(user!); } catch (error) { console.error(error); } }
UncleSamSwiss/iobroker-dev-portal
express/frontend/src/components/Dashboard.tsx
TypeScript
ArrowFunction
(old) => ({ ...old, [WATCHED_ADAPTERS_CATEGORY]: { cards: [] }, })
UncleSamSwiss/iobroker-dev-portal
express/frontend/src/components/Dashboard.tsx
TypeScript
ArrowFunction
async (info: AdapterInfos) => { setCategories((old) => ({ ...old, [WATCHED_ADAPTERS_CATEGORY]: { cards: [] }, })); // show spinner const url = getApiUrl("user"); const { data: dbUser } = await axios.get<DbUser>(url); dbUser.watches = dbUser.watches.filter( (w) => !equalIgnoreCase(w, info.repo.full_name), ); await axios.put(url, dbUser); onAdapterListChanged(); await loadWatchedAdapters(user!); }
UncleSamSwiss/iobroker-dev-portal
express/frontend/src/components/Dashboard.tsx
TypeScript
ArrowFunction
(w) => !equalIgnoreCase(w, info.repo.full_name)
UncleSamSwiss/iobroker-dev-portal
express/frontend/src/components/Dashboard.tsx
TypeScript
ArrowFunction
(title, index) => { const grid = categories[title]; return ( <Accordion key={index} expanded={!collapsed[index]}
UncleSamSwiss/iobroker-dev-portal
express/frontend/src/components/Dashboard.tsx
TypeScript
InterfaceDeclaration
interface AddWatchDialogProps { user: User; open?: boolean; onClose: (repo?: string) => void; }
UncleSamSwiss/iobroker-dev-portal
express/frontend/src/components/Dashboard.tsx
TypeScript
InterfaceDeclaration
interface DashboardProps { user?: User; onAdapterListChanged: () => void; }
UncleSamSwiss/iobroker-dev-portal
express/frontend/src/components/Dashboard.tsx
TypeScript
ArrowFunction
(str) => str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? "-" : "") + $.toLowerCase())
arthur-fontaine/auto-colladraw
src/lib/utils/kebabize.ts
TypeScript
ArrowFunction
($, ofs) => (ofs ? "-" : "") + $.toLowerCase()
arthur-fontaine/auto-colladraw
src/lib/utils/kebabize.ts
TypeScript
FunctionDeclaration
export function shift(event: Partial<KeyboardEvent>) { return { ...event, shiftKey: true } }
njaremko/headlessui
packages/@headlessui-react/src/test-utils/interactions.ts
TypeScript
FunctionDeclaration
export function word(input: string): Partial<KeyboardEvent>[] { return input.split('').map(key => ({ key })) }
njaremko/headlessui
packages/@headlessui-react/src/test-utils/interactions.ts
TypeScript
FunctionDeclaration
export async function type(events: Partial<KeyboardEvent>[]) { jest.useFakeTimers() try { if (document.activeElement === null) return expect(document.activeElement).not.toBe(null) const element = document.activeElement const d = disposables() events.forEach(event => { fireEvent.keyDown(element, event) }) // We don't want to actually wait in our tests, so let's advance jest.runAllTimers() await new Promise(d.nextFrame) } catch (err) { if (Error.captureStackTrace) Error.captureStackTrace(err, type) throw err } finally { jest.useRealTimers() } }
njaremko/headlessui
packages/@headlessui-react/src/test-utils/interactions.ts
TypeScript
FunctionDeclaration
export async function press(event: Partial<KeyboardEvent>) { return type([event]) }
njaremko/headlessui
packages/@headlessui-react/src/test-utils/interactions.ts
TypeScript
FunctionDeclaration
export async function click(element: Document | Element | Window | Node | null) { try { if (element === null) return expect(element).not.toBe(null) const d = disposables() fireEvent.pointerDown(element) fireEvent.mouseDown(element) fireEvent.pointerUp(element) fireEvent.mouseUp(element) fireEvent.click(element) await new Promise(d.nextFrame) } catch (err) { if (Error.captureStackTrace) Error.captureStackTrace(err, click) throw err } }
njaremko/headlessui
packages/@headlessui-react/src/test-utils/interactions.ts
TypeScript
FunctionDeclaration
export async function focus(element: Document | Element | Window | Node | null) { try { if (element === null) return expect(element).not.toBe(null) const d = disposables() fireEvent.focus(element) await new Promise(d.nextFrame) } catch (err) { if (Error.captureStackTrace) Error.captureStackTrace(err, focus) throw err } }
njaremko/headlessui
packages/@headlessui-react/src/test-utils/interactions.ts
TypeScript
FunctionDeclaration
export async function mouseMove(element: Document | Element | Window | Node | null) { try { if (element === null) return expect(element).not.toBe(null) const d = disposables() fireEvent.mouseMove(element) await new Promise(d.nextFrame) } catch (err) { if (Error.captureStackTrace) Error.captureStackTrace(err, mouseMove) throw err } }
njaremko/headlessui
packages/@headlessui-react/src/test-utils/interactions.ts
TypeScript
FunctionDeclaration
export async function hover(element: Document | Element | Window | Node | null) { try { if (element === null) return expect(element).not.toBe(null) const d = disposables() fireEvent.pointerOver(element) fireEvent.pointerEnter(element) fireEvent.mouseOver(element) await new Promise(d.nextFrame) } catch (err) { if (Error.captureStackTrace) Error.captureStackTrace(err, hover) throw err } }
njaremko/headlessui
packages/@headlessui-react/src/test-utils/interactions.ts
TypeScript
FunctionDeclaration
export async function unHover(element: Document | Element | Window | Node | null) { try { if (element === null) return expect(element).not.toBe(null) const d = disposables() fireEvent.pointerOut(element) fireEvent.pointerLeave(element) fireEvent.mouseOut(element) fireEvent.mouseLeave(element) await new Promise(d.nextFrame) } catch (err) { if (Error.captureStackTrace) Error.captureStackTrace(err, unHover) throw err } }
njaremko/headlessui
packages/@headlessui-react/src/test-utils/interactions.ts
TypeScript
ArrowFunction
key => ({ key })
njaremko/headlessui
packages/@headlessui-react/src/test-utils/interactions.ts
TypeScript
ArrowFunction
event => { fireEvent.keyDown(element, event) }
njaremko/headlessui
packages/@headlessui-react/src/test-utils/interactions.ts
TypeScript
ArrowFunction
() => { const DEPT = { id: '1', whom: 'Paul', amount: '5000', currency: 'RUB', date: '2020-05-30', comment: 'Comment', }; const INITIAL_STATE: DeptsState = { depts: [], isFetching: false, errorMessage: undefined, }; let dispatchedActions: any[]; let fakeStore: {}; beforeEach(() => { dispatchedActions = []; fakeStore = { getState: () => INITIAL_STATE, dispatch: (action: Action) => dispatchedActions.push(action), }; }); describe('fetchDeptsAsync', () => { it('should load depts and handle them in case of success', async () => { const mockedDepts = [DEPT, DEPT]; utils.request = jest.fn(() => Promise.resolve(mockedDepts)); await runSaga(fakeStore, fetchDeptsAsync); expect(utils.request.mock.calls.length).toBe(1); expect(dispatchedActions).toContainEqual(fetchDeptsSuccess(mockedDepts)); }); it('should handle errors in case of fail', async () => { const error = { message: 'Some error is thrown' }; utils.request = jest.fn(() => Promise.reject(error)); await runSaga(fakeStore, fetchDeptsAsync); expect(utils.request.mock.calls.length).toBe(1); expect(dispatchedActions).toContainEqual(fetchDeptsFailure(error.message)); }); }); }
dobernike/my_finances
src/redux/depts/__tests__/depts.sagas.test.ts
TypeScript
ArrowFunction
() => { dispatchedActions = []; fakeStore = { getState: () => INITIAL_STATE, dispatch: (action: Action) => dispatchedActions.push(action), }; }
dobernike/my_finances
src/redux/depts/__tests__/depts.sagas.test.ts
TypeScript
ArrowFunction
() => INITIAL_STATE
dobernike/my_finances
src/redux/depts/__tests__/depts.sagas.test.ts
TypeScript
ArrowFunction
(action: Action) => dispatchedActions.push(action)
dobernike/my_finances
src/redux/depts/__tests__/depts.sagas.test.ts
TypeScript
ArrowFunction
() => { it('should load depts and handle them in case of success', async () => { const mockedDepts = [DEPT, DEPT]; utils.request = jest.fn(() => Promise.resolve(mockedDepts)); await runSaga(fakeStore, fetchDeptsAsync); expect(utils.request.mock.calls.length).toBe(1); expect(dispatchedActions).toContainEqual(fetchDeptsSuccess(mockedDepts)); }); it('should handle errors in case of fail', async () => { const error = { message: 'Some error is thrown' }; utils.request = jest.fn(() => Promise.reject(error)); await runSaga(fakeStore, fetchDeptsAsync); expect(utils.request.mock.calls.length).toBe(1); expect(dispatchedActions).toContainEqual(fetchDeptsFailure(error.message)); }); }
dobernike/my_finances
src/redux/depts/__tests__/depts.sagas.test.ts
TypeScript
ArrowFunction
async () => { const mockedDepts = [DEPT, DEPT]; utils.request = jest.fn(() => Promise.resolve(mockedDepts)); await runSaga(fakeStore, fetchDeptsAsync); expect(utils.request.mock.calls.length).toBe(1); expect(dispatchedActions).toContainEqual(fetchDeptsSuccess(mockedDepts)); }
dobernike/my_finances
src/redux/depts/__tests__/depts.sagas.test.ts
TypeScript
ArrowFunction
() => Promise.resolve(mockedDepts)
dobernike/my_finances
src/redux/depts/__tests__/depts.sagas.test.ts
TypeScript
ArrowFunction
async () => { const error = { message: 'Some error is thrown' }; utils.request = jest.fn(() => Promise.reject(error)); await runSaga(fakeStore, fetchDeptsAsync); expect(utils.request.mock.calls.length).toBe(1); expect(dispatchedActions).toContainEqual(fetchDeptsFailure(error.message)); }
dobernike/my_finances
src/redux/depts/__tests__/depts.sagas.test.ts
TypeScript
FunctionDeclaration
function getCSSPath(el: any, ignoreIds: boolean) { if (!(el instanceof Element)) { return } const path = [] while (el.nodeType === Node.ELEMENT_NODE) { let selector = el.nodeName.toLowerCase() if (el.id && !ignoreIds) { selector += '#' + el.id.replace(/(:|\.|\[|\]|,)/g, '\\$1') path.unshift(selector) break } else { let sib = el let nth = 1 /* tslint:disable-next-line: no-conditional-assignment */ while ((sib = sib.previousElementSibling)) { if (sib.nodeName.toLowerCase() === selector) { nth++ } } if (nth !== 1) { selector += `:nth-of-type(${nth})` } } path.unshift(selector) el = el.parentNode if (el == null) { return } } return path.join(' > ') }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
FunctionDeclaration
function processPath(elementPath: any) { if (!elementPath) { return '' } const numPathElements = elementPath.length const path = [] let uniqueEl = false for (let i = 0; i < numPathElements - 1 && !uniqueEl; i++) { if (elementPath[i].id != null && elementPath[i].id !== '') { uniqueEl = true path.push({ uniqueId: elementPath[i].id, tagName: elementPath[i].tagName }) } else { let childIndex = null for (let j = 0; elementPath[i].parentNode != null && j < elementPath[i].parentNode.childNodes.length; j++) { if (elementPath[i].parentNode.childNodes[j] === elementPath[i]) { childIndex = j } } if (childIndex == null && elementPath[i] === document) { // WTF } else { path.push({ uniqueId: null, childIndex, tagName: elementPath[i].tagName }) } } } return path }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
ArrowFunction
(store: any) => { if (store.isRecording) { startRecording() } else { removeListeners() } }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
ArrowFunction
(msg, sender, sendResponse) => { console.log('message:', msg) if (msg.record === true) { console.log('starting to record') startRecording() chrome.runtime.sendMessage({ type: MessageType.Record, payload: true }) chrome.runtime.sendMessage({ type: MessageType.NewEvent, payload: { name: 'start', data: {url: window.location.href, screenWidth: window.screen.width, screenHeight: window.screen.height}, time: Number(Date.now()) } }) } else if (msg.record === false) { console.log('stopping to record') removeListeners() chrome.runtime.sendMessage({ type: MessageType.NewEvent, payload: { name: 'end', data: {url: window.location.href}, time: Number(Date.now()) } }) chrome.runtime.sendMessage({ type: MessageType.StopRecording, payload: msg.scenarioId }) } else { sendResponse('unknown command.') } }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
ArrowFunction
() => { console.log('removing listeners') Array.from(listeners.keys()).forEach((k: string) => { const lst = listeners.get(k) if (lst) { lst.forEach((l: EventListenerOrEventListenerObject) => { console.log('removing listener', k) document.body.removeEventListener(k, l) }) } }) const scl = listeners.get('scroll') if (scl) { window.removeEventListener('scroll', scl[0], false) } }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
ArrowFunction
(k: string) => { const lst = listeners.get(k) if (lst) { lst.forEach((l: EventListenerOrEventListenerObject) => { console.log('removing listener', k) document.body.removeEventListener(k, l) }) } }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
ArrowFunction
(l: EventListenerOrEventListenerObject) => { console.log('removing listener', k) document.body.removeEventListener(k, l) }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
ArrowFunction
() => { console.log('adding listeners') Object.values(DOMEvent).forEach(addDocumentEventListener) }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
ArrowFunction
(eventName: string) => { const listener = listenerHandler(eventName) const evtListeners = listeners.get(eventName) if (evtListeners) { evtListeners.push(listener) } else { listeners.set(eventName, [listener]) } if (eventName === DOMEvent.Scroll) { window.addEventListener(eventName, throttle(listener, 1000)) } else { document.body.addEventListener(eventName, listener, false) } }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
ArrowFunction
(eventName: string) => (e: Event | any) => { const mEvt = e as MouseEvent const kEvt = e as KeyboardEvent const eventData = { path: processPath(e.path), csspath: getCSSPath(e.target, false), csspathfull: getCSSPath(e.target, true), clientX: mEvt.clientX, clientY: mEvt.clientY, scrollX: window.scrollX, scrollY: window.scrollY, // altKey: mEvt.altKey, // ctrlKey: mEvt.ctrlKey, // shiftKey: mEvt.shiftKey, // metaKey: mEvt.metaKey, button: mEvt.button, // bubbles: e.bubbles, keyCode: -1, selectValue: '', value: '', type: '', // cancelable: e.cancelable, innerText: e.target ? (e.target as HTMLInputElement).innerText || '' : '', url: window.location.href } if (eventName === 'select') { eventData.selectValue = kEvt.target ? (kEvt.target as HTMLSelectElement).value : '' } if (eventName === 'keyup' || eventName === 'keydown' || eventName === 'keypress') { eventData.keyCode = kEvt.keyCode } if (eventName === 'input' || eventName === 'propertychange' || eventName === 'change') { eventData.type = kEvt.target ? (kEvt.target as HTMLInputElement).tagName.toLowerCase() : '' /* tslint:disable-next-line: prefer-conditional-expression */ if (eventData.type === 'input' || eventData.type === 'textarea') { eventData.value = (e.target as HTMLInputElement).value } else { eventData.value = (e.target as HTMLInputElement).innerText } } if (eventName === 'cut') { eventName = 'clipboard_cut' } if (eventName === 'copy') { eventName = 'clipboard_copy' } if (eventName === 'paste') { eventName = 'clipboard_paste' } if (eventName === 'wfSubmit') { eventName = 'submit' } chrome.storage.local.get(StorageKey.IsRecording, (store: any) => { if (store.isRecording) { chrome.runtime.sendMessage({ type: MessageType.NewEvent, payload: { name: eventName, data: eventData, time: Number(Date.now()) } }) } }) }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
ArrowFunction
(e: Event | any) => { const mEvt = e as MouseEvent const kEvt = e as KeyboardEvent const eventData = { path: processPath(e.path), csspath: getCSSPath(e.target, false), csspathfull: getCSSPath(e.target, true), clientX: mEvt.clientX, clientY: mEvt.clientY, scrollX: window.scrollX, scrollY: window.scrollY, // altKey: mEvt.altKey, // ctrlKey: mEvt.ctrlKey, // shiftKey: mEvt.shiftKey, // metaKey: mEvt.metaKey, button: mEvt.button, // bubbles: e.bubbles, keyCode: -1, selectValue: '', value: '', type: '', // cancelable: e.cancelable, innerText: e.target ? (e.target as HTMLInputElement).innerText || '' : '', url: window.location.href } if (eventName === 'select') { eventData.selectValue = kEvt.target ? (kEvt.target as HTMLSelectElement).value : '' } if (eventName === 'keyup' || eventName === 'keydown' || eventName === 'keypress') { eventData.keyCode = kEvt.keyCode } if (eventName === 'input' || eventName === 'propertychange' || eventName === 'change') { eventData.type = kEvt.target ? (kEvt.target as HTMLInputElement).tagName.toLowerCase() : '' /* tslint:disable-next-line: prefer-conditional-expression */ if (eventData.type === 'input' || eventData.type === 'textarea') { eventData.value = (e.target as HTMLInputElement).value } else { eventData.value = (e.target as HTMLInputElement).innerText } } if (eventName === 'cut') { eventName = 'clipboard_cut' } if (eventName === 'copy') { eventName = 'clipboard_copy' } if (eventName === 'paste') { eventName = 'clipboard_paste' } if (eventName === 'wfSubmit') { eventName = 'submit' } chrome.storage.local.get(StorageKey.IsRecording, (store: any) => { if (store.isRecording) { chrome.runtime.sendMessage({ type: MessageType.NewEvent, payload: { name: eventName, data: eventData, time: Number(Date.now()) } }) } }) }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
ArrowFunction
(store: any) => { if (store.isRecording) { chrome.runtime.sendMessage({ type: MessageType.NewEvent, payload: { name: eventName, data: eventData, time: Number(Date.now()) } }) } }
Assist-DevQ/chrome-extension
src/content_script/index.ts
TypeScript
FunctionDeclaration
export async function handler(argv: any) { verifySetup(); if (!argv.skipBuild && argv.buildTaskName && argv.buildTaskName.length > 0) { runPackageScript([argv.buildTaskName]); } const options = { destinationPath: argv.destination, sourcePath: argv.source, excludeFile: argv.exclude, clean: argv.clean, }; if (!options.sourcePath || !options.destinationPath) { const packageJson = await resolvePackage(); if (!options.sourcePath) { options.sourcePath = packageJson.config.buildArtifactsPath; if (!options.sourcePath) { // nothing explicit set, let's try to imply a path. 'build/index.html' = CRA convention if (fs.existsSync('build/index.html')) { options.sourcePath = path.resolve('build'); } else if (fs.existsSync('dist/client.bundle.js')) { // /dist = non-CRA convention options.sourcePath = path.resolve('dist'); } else { throw new Error( 'No source path specified, conventional build paths missing, and buildArtifactsPath config is not defined in package.json!' ); } } } if (!options.destinationPath) { const scJssConfig = await resolveScJssConfig(); options.destinationPath = path.join( scJssConfig.sitecore.instancePath as string, packageJson.config.sitecoreDistPath ); } } deploy(options); }
Bram-Zijp/jss
packages/sitecore-jss-cli/src/scripts/deploy.files.ts
TypeScript
ArrowFunction
(props: RenderLayerProps) => { const { diagram, previewItems, renderContainer, rendererService, onRender, } = props; const shapesRendered = React.useRef(onRender); const shapeRefsById = React.useRef<{ [id: string]: ShapeRef }>({}); const orderedShapes = React.useMemo(() => { const flattenShapes: DiagramItem[] = []; if (diagram) { let handleContainer: (itemIds: DiagramContainer) => any; // eslint-disable-next-line prefer-const handleContainer = itemIds => { for (const id of itemIds.values) { const item = diagram.items.get(id); if (item) { if (item.type === 'Shape') { flattenShapes.push(item); } if (item.type === 'Group') { handleContainer(item.childIds); } } } }; handleContainer(diagram.itemIds); } return flattenShapes; }, [diagram]); React.useEffect(() => { const allShapesById: { [id: string]: boolean } = {}; const allShapes = orderedShapes; allShapes.forEach(item => { allShapesById[item.id] = true; }); const references = shapeRefsById.current; // Delete old shapes. for (const [id, ref] of Object.entries(references)) { if (!allShapesById[id]) { ref.remove(); delete references[id]; } } // Create missing shapes. for (const shape of allShapes) { if (!references[shape.id]) { const rendererInstance = rendererService.get(shape.renderer); references[shape.id] = new ShapeRef(renderContainer, rendererInstance, showDebugOutlines); } } let hasIdChanged = false; allShapes.forEach((shape, i) => { if (!references[shape.id].checkIndex(i)) { hasIdChanged = true; } }); // If the index of at least once shape has changed we have to remove them all to render them in the correct order. if (hasIdChanged) { for (const ref of Object.values(references)) { ref.remove(); } } for (const shape of allShapes) { references[shape.id].render(shape); } if (shapesRendered.current) { shapesRendered.current(); } }, [renderContainer, orderedShapes, rendererService]); React.useEffect(() => { if (previewItems) { for (const item of previewItems) { shapeRefsById.current[item.id]?.setPreview(item); } } else { for (const reference of Object.values(shapeRefsById.current)) { reference.setPreview(null); } } }, [previewItems]); return null; }
MSGoodman/ui
src/wireframes/renderer/RenderLayer.tsx
TypeScript
ArrowFunction
() => { const flattenShapes: DiagramItem[] = []; if (diagram) { let handleContainer: (itemIds: DiagramContainer) => any; // eslint-disable-next-line prefer-const handleContainer = itemIds => { for (const id of itemIds.values) { const item = diagram.items.get(id); if (item) { if (item.type === 'Shape') { flattenShapes.push(item); } if (item.type === 'Group') { handleContainer(item.childIds); } } } }; handleContainer(diagram.itemIds); } return flattenShapes; }
MSGoodman/ui
src/wireframes/renderer/RenderLayer.tsx
TypeScript
ArrowFunction
itemIds => { for (const id of itemIds.values) { const item = diagram.items.get(id); if (item) { if (item.type === 'Shape') { flattenShapes.push(item); } if (item.type === 'Group') { handleContainer(item.childIds); } } } }
MSGoodman/ui
src/wireframes/renderer/RenderLayer.tsx
TypeScript
ArrowFunction
() => { const allShapesById: { [id: string]: boolean } = {}; const allShapes = orderedShapes; allShapes.forEach(item => { allShapesById[item.id] = true; }); const references = shapeRefsById.current; // Delete old shapes. for (const [id, ref] of Object.entries(references)) { if (!allShapesById[id]) { ref.remove(); delete references[id]; } } // Create missing shapes. for (const shape of allShapes) { if (!references[shape.id]) { const rendererInstance = rendererService.get(shape.renderer); references[shape.id] = new ShapeRef(renderContainer, rendererInstance, showDebugOutlines); } } let hasIdChanged = false; allShapes.forEach((shape, i) => { if (!references[shape.id].checkIndex(i)) { hasIdChanged = true; } }); // If the index of at least once shape has changed we have to remove them all to render them in the correct order. if (hasIdChanged) { for (const ref of Object.values(references)) { ref.remove(); } } for (const shape of allShapes) { references[shape.id].render(shape); } if (shapesRendered.current) { shapesRendered.current(); } }
MSGoodman/ui
src/wireframes/renderer/RenderLayer.tsx
TypeScript
ArrowFunction
item => { allShapesById[item.id] = true; }
MSGoodman/ui
src/wireframes/renderer/RenderLayer.tsx
TypeScript
ArrowFunction
(shape, i) => { if (!references[shape.id].checkIndex(i)) { hasIdChanged = true; } }
MSGoodman/ui
src/wireframes/renderer/RenderLayer.tsx
TypeScript
ArrowFunction
() => { if (previewItems) { for (const item of previewItems) { shapeRefsById.current[item.id]?.setPreview(item); } } else { for (const reference of Object.values(shapeRefsById.current)) { reference.setPreview(null); } } }
MSGoodman/ui
src/wireframes/renderer/RenderLayer.tsx
TypeScript
InterfaceDeclaration
export interface RenderLayerProps { // The renderer service. rendererService: RendererService; // The selected diagram. diagram?: Diagram; // The container to render on. renderContainer: svg.Container; // The preview items. previewItems?: ReadonlyArray<DiagramItem>; // True when rendered. onRender?: () => void; }
MSGoodman/ui
src/wireframes/renderer/RenderLayer.tsx
TypeScript
FunctionDeclaration
export default function () { on("RESIZE_WINDOW", function (windowSize: { width: number; height: number }) { const { width, height } = windowSize; figma.ui.resize(width, height); }); showUI({ height: 500, width: 500, }); }
alexwidua/create-figma-plugin-components
src/plugin/main.ts
TypeScript
FunctionDeclaration
function _CalendarHeader<T>({ dateRange, cellHeight, style, allDayEvents, onPressDateHeader, DayNumberContainerStyle, events, onPressEvent = () => console.log('onPressEvent'), }: CalendarHeaderProps<T>) { const _onPress = React.useCallback( (date: Date) => { onPressDateHeader && onPressDateHeader(date) }, [onPressDateHeader], ) const theme = useTheme() // const [showMore, setShowMore] = React.useState(false) const borderColor = { borderColor: theme.palette.gray['200'] } const primaryBg = { backgroundColor: theme.palette.primary.main } const appendZero = (hexaValue) => { while (hexaValue.length < 2) hexaValue = '0' + hexaValue return hexaValue } const calculateWeightedColor = (dayEvents) => { let totalDuration = 0 let totalR = 0 let totalG = 0 let totalB = 0 dayEvents.forEach((element) => { const r = parseInt(element.color.substring(0, 2), 16) * element.duration const g = parseInt(element.color.substring(2, 4), 16) * element.duration const b = parseInt(element.color.substring(4, 6), 16) * element.duration totalR = totalR + r totalG = totalG + g totalB = totalB + b totalDuration = totalDuration + element.duration }) const meanR = Math.round(totalR / totalDuration) const meanG = Math.round(totalG / totalDuration) const meanB = Math.round(totalB / totalDuration) const weightedColor = '#' + appendZero(meanR.toString(16).toUpperCase()) + appendZero(meanG.toString(16).toUpperCase()) + appendZero(meanB.toString(16).toUpperCase()) return weightedColor } const todayColor = (date, isTopDay) => { const todayEvents = events .filter(({ start }) => dayjs(start).isBetween(date.startOf('day'), date.endOf('day'), null, '[)'), ) .map((i) => { if (!(i && i.color)) i.color = '#FFFF00' return { color: i.color.substring(1, 7), duration: dayjs(i.end).diff(dayjs(i.start), 'hour', true), } }) if (todayEvents.length == 0 && !isTopDay) return 'transparent' if (todayEvents.length == 0 && isTopDay) return '#2E2E2E' let weightedColor = calculateWeightedColor(todayEvents) return weightedColor } return ( <View style={[ u['border-b-2'], u['pt-2'], { backgroundColor: '#FAFAFA' }, borderColor, theme.isRTL ? u['flex-row-reverse'] : u['flex-row'], style, ]} > <View style={[u['w-50'], u['items-center']]}> <Text style={[theme.typography.xs, u['mb-4']]}>Week</Text> <View style={[u['w-36'], u['h-36'], u['bordered'], u['justify-center'], u['items-center']]}> <Text style={[theme.typography.xl]}> {Math.ceil(parseInt(dayjs(dateRange[0]).format('DD')) / 7)} </Text> </View> <Text style={[theme.typography.xs, u['mt-6']]}>All day</Text> </View> {dateRange.map((date) => { const _isToday = isToday(date) return ( <TouchableOpacity style={[u['flex-1'], u['pt-2'], u['mb-2']]} onPress={() => _onPress(date.toDate())} disabled={onPressDateHeader === undefined} key={date.toString()} > <View style={[u['justify-between'], { minHeight: cellHeight }]}> <Text style={[ theme.typography.xs, u['text-center'], u['mb-4'], { color: todayColor(date, true), fontFamily: 'segoeui', fontSize: 11, }, ]} > {date.format('ddd')[0]} </Text> <View style={ !_isToday ? [ primaryBg, u['h-36'], u['w-36'], u['rounded-full'], u['items-center'], u['justify-center'], u['self-center'], u['z-20'], DayNumberContainerStyle, { backgroundColor: todayColor(date, false) }, ] : [ primaryBg, u['h-36'], u['w-36'], u['pb-2'], u['rounded-full'], u['items-center'], u['justify-center'], u['self-center'], u['z-20'], { borderWidth: 2.5, borderColor: todayColor(date, false), backgroundColor: 'transparent', }, ] }
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
ArrowFunction
() => console.log('onPressEvent')
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
ArrowFunction
(date: Date) => { onPressDateHeader && onPressDateHeader(date) }
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
ArrowFunction
(hexaValue) => { while (hexaValue.length < 2) hexaValue = '0' + hexaValue return hexaValue }
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
ArrowFunction
(dayEvents) => { let totalDuration = 0 let totalR = 0 let totalG = 0 let totalB = 0 dayEvents.forEach((element) => { const r = parseInt(element.color.substring(0, 2), 16) * element.duration const g = parseInt(element.color.substring(2, 4), 16) * element.duration const b = parseInt(element.color.substring(4, 6), 16) * element.duration totalR = totalR + r totalG = totalG + g totalB = totalB + b totalDuration = totalDuration + element.duration }) const meanR = Math.round(totalR / totalDuration) const meanG = Math.round(totalG / totalDuration) const meanB = Math.round(totalB / totalDuration) const weightedColor = '#' + appendZero(meanR.toString(16).toUpperCase()) + appendZero(meanG.toString(16).toUpperCase()) + appendZero(meanB.toString(16).toUpperCase()) return weightedColor }
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
ArrowFunction
(element) => { const r = parseInt(element.color.substring(0, 2), 16) * element.duration const g = parseInt(element.color.substring(2, 4), 16) * element.duration const b = parseInt(element.color.substring(4, 6), 16) * element.duration totalR = totalR + r totalG = totalG + g totalB = totalB + b totalDuration = totalDuration + element.duration }
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
ArrowFunction
(date, isTopDay) => { const todayEvents = events .filter(({ start }) => dayjs(start).isBetween(date.startOf('day'), date.endOf('day'), null, '[)'), ) .map((i) => { if (!(i && i.color)) i.color = '#FFFF00' return { color: i.color.substring(1, 7), duration: dayjs(i.end).diff(dayjs(i.start), 'hour', true), } }) if (todayEvents.length == 0 && !isTopDay) return 'transparent' if (todayEvents.length == 0 && isTopDay) return '#2E2E2E' let weightedColor = calculateWeightedColor(todayEvents) return weightedColor }
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
ArrowFunction
({ start }) => dayjs(start).isBetween(date.startOf('day'), date.endOf('day'), null, '[)')
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
ArrowFunction
(i) => { if (!(i && i.color)) i.color = '#FFFF00' return { color: i.color.substring(1, 7), duration: dayjs(i.end).diff(dayjs(i.start), 'hour', true), } }
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
ArrowFunction
(date) => { const _isToday = isToday(date) return ( <TouchableOpacity style={[u['flex-1'], u['pt-2'], u['mb-2']]} onPress={() => _onPress(date.toDate())}
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
ArrowFunction
(event, index) => { if (!dayjs(event.start).isSame(date, 'day')) { return null } if (index <= 2) return ( <TouchableOpacity style={[ eventCellCss.style, primaryBg, { width: getWidthOfAllDayInPercent(event.start, event.end) + '%' }, ]} key={`${event.start}${event.title}`}
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
InterfaceDeclaration
export interface CalendarHeaderProps<T> { dateRange: dayjs.Dayjs[] cellHeight: number style: ViewStyle allDayEvents: ICalendarEvent<T>[] DayNumberContainerStyle: ViewStyle events: ICalendarEvent<T>[] onPressDateHeader?: (date: Date) => void onPressEvent?: (event: ICalendarEvent<T>) => void }
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
MethodDeclaration
moment(date
SnVosooghi/react-native-draggable-big-calendar
src/components/CalendarHeader.tsx
TypeScript
ClassDeclaration
export declare class FormatTimerPipe implements PipeTransform { transform(totalSeconds: number): string; static ɵfac: ɵngcc0.ɵɵFactoryDef<FormatTimerPipe, never>; static ɵpipe: ɵngcc0.ɵɵPipeDefWithMeta<FormatTimerPipe, "formatTimer">; }
apanwar/spartacus-bootcamp
setup-traditional/mystore/node_modules/@spartacus/storefront/cms-components/asm/asm-session-timer/format-timer.pipe.d.ts
TypeScript
MethodDeclaration
transform(totalSeconds: number): string;
apanwar/spartacus-bootcamp
setup-traditional/mystore/node_modules/@spartacus/storefront/cms-components/asm/asm-session-timer/format-timer.pipe.d.ts
TypeScript
ArrowFunction
({ host, apiKey }) => ({ headers: { host }, header: jest.fn().mockReturnValue(apiKey), } as unknown as Request)
JoseMarshall/coodesh-back-end-challenge
src/main/middleware/__tests__/api-key-checker.test.ts
TypeScript
ArrowFunction
({ req = makeRequestObject(collections.apikeys[0]) }) => { const json = jest.fn(); const next = jest.fn(); const status = jest.fn().mockReturnValue({ json }); return { sut: validateApiKey( req, { status, } as unknown as Response, next ), next, status, json, }; }
JoseMarshall/coodesh-back-end-challenge
src/main/middleware/__tests__/api-key-checker.test.ts
TypeScript
ArrowFunction
() => { beforeAll(async () => { await connect(); await collectionInit(ApiKeyModel, CollectionNames.ApiKeys); }); afterAll(async () => { await dropDatabase(); await disconnect(); }); it('should increment the usage of api key', async () => { const { next, sut } = makeSut({}); await sut; expect(next).toHaveBeenCalledTimes(1); }); it('should add new usage of api key', async () => { const { next, sut } = makeSut({ req: makeRequestObject(collections.apikeys[2]) }); await sut; expect(next).toHaveBeenCalledTimes(1); }); it('should call status with 429 due to max api key usage exceeded', async () => { const { status, sut } = makeSut({ req: makeRequestObject(collections.apikeys[1]), }); await sut; expect(status).toHaveBeenCalledWith(429); }); it('should call status with 403 due to api key undefined', async () => { const { status, sut } = makeSut({ req: { host: 'localhost' } as any, }); await sut; expect(status).toHaveBeenCalledWith(403); }); }
JoseMarshall/coodesh-back-end-challenge
src/main/middleware/__tests__/api-key-checker.test.ts
TypeScript
ArrowFunction
async () => { await connect(); await collectionInit(ApiKeyModel, CollectionNames.ApiKeys); }
JoseMarshall/coodesh-back-end-challenge
src/main/middleware/__tests__/api-key-checker.test.ts
TypeScript
ArrowFunction
async () => { await dropDatabase(); await disconnect(); }
JoseMarshall/coodesh-back-end-challenge
src/main/middleware/__tests__/api-key-checker.test.ts
TypeScript
ArrowFunction
async () => { const { next, sut } = makeSut({}); await sut; expect(next).toHaveBeenCalledTimes(1); }
JoseMarshall/coodesh-back-end-challenge
src/main/middleware/__tests__/api-key-checker.test.ts
TypeScript
ArrowFunction
async () => { const { next, sut } = makeSut({ req: makeRequestObject(collections.apikeys[2]) }); await sut; expect(next).toHaveBeenCalledTimes(1); }
JoseMarshall/coodesh-back-end-challenge
src/main/middleware/__tests__/api-key-checker.test.ts
TypeScript
ArrowFunction
async () => { const { status, sut } = makeSut({ req: makeRequestObject(collections.apikeys[1]), }); await sut; expect(status).toHaveBeenCalledWith(429); }
JoseMarshall/coodesh-back-end-challenge
src/main/middleware/__tests__/api-key-checker.test.ts
TypeScript
ArrowFunction
async () => { const { status, sut } = makeSut({ req: { host: 'localhost' } as any, }); await sut; expect(status).toHaveBeenCalledWith(403); }
JoseMarshall/coodesh-back-end-challenge
src/main/middleware/__tests__/api-key-checker.test.ts
TypeScript
InterfaceDeclaration
export interface IResourcePieChartProps extends PieChartProps { resourceCollection: ResourceCollection; render?(data: any): React.ReactNode | React.ReactNodeArray; }
webpanel/recharts
src/PieChart/ResourcePieChartProps.tsx
TypeScript
ArrowFunction
() => { this.view_loaded(); }
Justin-Credible/nintendo-vs-frontend
src/renderer/Framework/BaseController.ts
TypeScript
ClassDeclaration
/** * This is the base controller that all other controllers should utilize. * * It handles saving a reference to the Angular scope, newing up the given * model object type, and injecting the view model and controller onto the * scope object for use in views. * * T - The parameter type for the model. */ export abstract class BaseController<T> { protected scope: ng.IScope; protected viewModel: T; constructor(scope: ng.IScope, ModelType: { new (): T; }) { // Uncomment for debugging view events. //console.log("ctor() " + this.constructor["ID"]); // Save a reference to Angular's scope object. this.scope = scope; // Create the view model. this.viewModel = new ModelType(); /* tslint:disable:no-string-literal */ // Push the view model onto the scope so it can be // referenced from the template/views. this.scope["viewModel"] = this.viewModel; // Push the controller onto the scope so it can be // used to reference events for controls etc. this.scope["controller"] = this; /* tslint:enable:no-string-literal */ _.defer(() => { this.view_loaded(); }); } /** * Invoked when the controller has been bound to a template. * * Can be overridden by implementing controllers. */ protected view_loaded(): void { /* tslint:disable:no-empty */ /* tslint:enable:no-empty */ } }
Justin-Credible/nintendo-vs-frontend
src/renderer/Framework/BaseController.ts
TypeScript
MethodDeclaration
/** * Invoked when the controller has been bound to a template. * * Can be overridden by implementing controllers. */ protected view_loaded(): void { /* tslint:disable:no-empty */ /* tslint:enable:no-empty */ }
Justin-Credible/nintendo-vs-frontend
src/renderer/Framework/BaseController.ts
TypeScript
FunctionDeclaration
export default function Plans() { const router = useRouter(); const [location, setLocation] = useState(''); useEffect(() => { setLocation('Estados Unidos'); }, []); const switchLocation = (location: string) => { setLocation(location); }; return ( <> <div className="animate__animated animate__backInDown"> <div className={styles.Plans}> <div className={styles.Locations}> <div className={`${styles.Location} ${ location == 'Estados Unidos' ? styles.Active : '' }`} onClick={() => switchLocation('Estados Unidos')}
Slozin/-Ryper-Site
src/components/Website/Servers/Plans/index.tsx
TypeScript
ArrowFunction
() => { setLocation('Estados Unidos'); }
Slozin/-Ryper-Site
src/components/Website/Servers/Plans/index.tsx
TypeScript
ArrowFunction
(location: string) => { setLocation(location); }
Slozin/-Ryper-Site
src/components/Website/Servers/Plans/index.tsx
TypeScript
ArrowFunction
() => router.push('/servers')
Slozin/-Ryper-Site
src/components/Website/Servers/Plans/index.tsx
TypeScript
ArrowFunction
() => <Panel>{lorem}</Panel>) .add("narrow", () => <Panel narrow={true}>{lorem}</Panel>) .add("with header text", () => <Panel headerText="Sample header text">{lorem}</Panel>) .add("with header text and icon", () => ( <Panel headerText="Sample header text" icon={icon}> {lorem} </Panel> )) .add("with header text and right component", () => ( <Panel headerText="Sample header text" rightComponent={<ButtonInline onClick={action("onClick")}>Go to Wallet</ButtonInline>} > {lorem} </Panel> )) .add("rounded", () => <PanelRounded>{lorem}</PanelRounded>);
desfero/platform-frontend
packages/web/app/components/shared/Panel.stories.tsx
TypeScript
ArrowFunction
() => <Panel narrow
desfero/platform-frontend
packages/web/app/components/shared/Panel.stories.tsx
TypeScript
ArrowFunction
() => <Panel headerText
desfero/platform-frontend
packages/web/app/components/shared/Panel.stories.tsx
TypeScript
ArrowFunction
() => ( <Panel headerText="Sample header text"
desfero/platform-frontend
packages/web/app/components/shared/Panel.stories.tsx
TypeScript
ArrowFunction
() => ( <Panel headerText="Sample header text"
desfero/platform-frontend
packages/web/app/components/shared/Panel.stories.tsx
TypeScript
ArrowFunction
() => <PanelRounded>{lorem}</PanelRounded>);
desfero/platform-frontend
packages/web/app/components/shared/Panel.stories.tsx
TypeScript
MethodDeclaration
action("onClick")
desfero/platform-frontend
packages/web/app/components/shared/Panel.stories.tsx
TypeScript
ArrowFunction
() => { return ( <> <Seo templateTitle='Ingfo' /> <Nav /> <main> <section className=''> <div className='layout min-h-screen space-y-10 py-16'> <div className='space-y-10'> <div className='space-y-4'> <h1 className='text-primary-200'>Ingfo</h1> <p> Situs ini {'"'}terinspirasi{'"'} dari punyanya informatika, buatannya si{' '} <CustomLink href='https://theodorusclarence.com'> Clarence </CustomLink> . Nih{' '} <CustomLink href='https://class.thcl.dev/'> linknya </CustomLink> </p> <p> Kalau ada bug atau saran fitur bisa bikin issue atau kalo bisa PR ke repo berikut: </p> <ArrowLink href='https://github.com/lordronz/dtk-class-helper'> Source code </ArrowLink> <p> Bisa jg lewat{' '} <CustomLink href='#comment-section'> comment section </CustomLink>{' '} yg ada disini atau di{' '} <CustomLink href='/#comment-section'>Home</CustomLink> </p> <p>Atau pm aja sih ya, buat yg kenal</p> <p> Karena yang buat ini juga manusia, bisa aja salah, mungkin salah typo/bug lain. Kalo saran fitur jg sangat boleh. Atau mungkin mau komplen soal styling jg ga masalah. Misal warnanya dark bgt nih, merah semua nih, atau ga keliatan fontnya atau kekecilan fontnya atau ada saran font jg sangat diperbolehkan. </p> </div> <div className='space-y-4'> <h4>Data matkul</h4> <ArrowLink href='/api/matkul' openNewTab> Link API JSON </ArrowLink> </div> <div className='space-y-4'> <h4>Kontak</h4> <Contact /> </div> </div> <div className='flex items-center justify-center'> <ArrowLink href='/' className='text-primary-200' direction='left'> Balik ke Home </ArrowLink> </div> <div id='comment-section'> <Comment /> </div> </div> </section> </main> </>
LordRonz/dtk-class-helper
src/pages/ingfo.tsx
TypeScript
ClassDeclaration
/** * <p>Creates and defines the settings for a classification job.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { Macie2Client, CreateClassificationJobCommand } from "@aws-sdk/client-macie2"; // ES Modules import * // const { Macie2Client, CreateClassificationJobCommand } = require("@aws-sdk/client-macie2"); // CommonJS import * const client = new Macie2Client(config); * const command = new CreateClassificationJobCommand(input); * const response = await client.send(command); * ``` * * @see {@link CreateClassificationJobCommandInput} for command's `input` shape. * @see {@link CreateClassificationJobCommandOutput} for command's `response` shape. * @see {@link Macie2ClientResolvedConfig | config} for command's `input` shape. * */ export class CreateClassificationJobCommand extends $Command< CreateClassificationJobCommandInput, CreateClassificationJobCommandOutput, Macie2ClientResolvedConfig > { // Start section: command_properties // End section: command_properties constructor(readonly input: CreateClassificationJobCommandInput) { // Start section: command_constructor super(); // End section: command_constructor } /** * @internal */ resolveMiddleware( clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: Macie2ClientResolvedConfig, options?: __HttpHandlerOptions ): Handler<CreateClassificationJobCommandInput, CreateClassificationJobCommandOutput> { this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "Macie2Client"; const commandName = "CreateClassificationJobCommand"; const handlerExecutionContext: HandlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: CreateClassificationJobRequest.filterSensitiveLog, outputFilterSensitiveLog: CreateClassificationJobResponse.filterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve( (request: FinalizeHandlerArguments<any>) => requestHandler.handle(request.request as __HttpRequest, options || {}), handlerExecutionContext ); } private serialize(input: CreateClassificationJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { return serializeAws_restJson1CreateClassificationJobCommand(input, context); } private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateClassificationJobCommandOutput> { return deserializeAws_restJson1CreateClassificationJobCommand(output, context); } // Start section: command_body_extra // End section: command_body_extra }
Sordie/aws-sdk-js-v3
clients/client-macie2/src/commands/CreateClassificationJobCommand.ts
TypeScript
InterfaceDeclaration
export interface CreateClassificationJobCommandInput extends CreateClassificationJobRequest {}
Sordie/aws-sdk-js-v3
clients/client-macie2/src/commands/CreateClassificationJobCommand.ts
TypeScript
InterfaceDeclaration
export interface CreateClassificationJobCommandOutput extends CreateClassificationJobResponse, __MetadataBearer {}
Sordie/aws-sdk-js-v3
clients/client-macie2/src/commands/CreateClassificationJobCommand.ts
TypeScript
MethodDeclaration
/** * @internal */ resolveMiddleware( clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: Macie2ClientResolvedConfig, options?: __HttpHandlerOptions ): Handler<CreateClassificationJobCommandInput, CreateClassificationJobCommandOutput> { this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "Macie2Client"; const commandName = "CreateClassificationJobCommand"; const handlerExecutionContext: HandlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: CreateClassificationJobRequest.filterSensitiveLog, outputFilterSensitiveLog: CreateClassificationJobResponse.filterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve( (request: FinalizeHandlerArguments<any>) => requestHandler.handle(request.request as __HttpRequest, options || {}), handlerExecutionContext ); }
Sordie/aws-sdk-js-v3
clients/client-macie2/src/commands/CreateClassificationJobCommand.ts
TypeScript
MethodDeclaration
private serialize(input: CreateClassificationJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { return serializeAws_restJson1CreateClassificationJobCommand(input, context); }
Sordie/aws-sdk-js-v3
clients/client-macie2/src/commands/CreateClassificationJobCommand.ts
TypeScript
MethodDeclaration
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateClassificationJobCommandOutput> { return deserializeAws_restJson1CreateClassificationJobCommand(output, context); }
Sordie/aws-sdk-js-v3
clients/client-macie2/src/commands/CreateClassificationJobCommand.ts
TypeScript
ArrowFunction
({ title, description, typographyProps, to, external, linkText, onClick, }: Props) => { const hasLinkText = useMemo(() => Boolean(linkText), [linkText]); const renderTitle = useCallback(() => { const { typography = 'Subtitle1', ...restTypographyProps } = typographyProps || {}; return ( <Title md={typography} {...restTypographyProps}
pedaling/class101-ui
src/layout/Section/Header.tsx
TypeScript
ArrowFunction
() => Boolean(linkText)
pedaling/class101-ui
src/layout/Section/Header.tsx
TypeScript
ArrowFunction
() => { const { typography = 'Subtitle1', ...restTypographyProps } = typographyProps || {}; return ( <Title md={typography} {
pedaling/class101-ui
src/layout/Section/Header.tsx
TypeScript