type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
() => { const router = useRouter() const { guestId, customerId, cart, isAuthenticated, id, error, loading: payment, } = useSelector((state: IInitialState) => state) const cartId = !!customerId ? customerId : guestId const token = cookie.get('token') const { loading } = useQu...
iamsharzil/next.js
examples/cms-magento/pages/checkout/[step].tsx
TypeScript
ArrowFunction
(state: IInitialState) => state
iamsharzil/next.js
examples/cms-magento/pages/checkout/[step].tsx
TypeScript
MethodDeclaration
loading ? ( <Loader loading={loading} /> ) : ( <FadeIn> <div className="container"> <div className="row mt-5"> {!!
iamsharzil/next.js
examples/cms-magento/pages/checkout/[step].tsx
TypeScript
ArrowFunction
data => { this.router.navigate([this.returnUrl]); }
GustavoLAF/Gerenciador-de-Planos-de-Aula
Sistema de Gestao Academico/Web/ClientApp/src/app/login/login.component.ts
TypeScript
ArrowFunction
error => { this.credencial.senha = null; this.alertService.error(error); this.autenticando = false; }
GustavoLAF/Gerenciador-de-Planos-de-Aula
Sistema de Gestao Academico/Web/ClientApp/src/app/login/login.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-login', templateUrl: './login.component.html', styleUrls: ['./login.component.css'] }) export class LoginComponent implements OnInit { credencial: Credencial; autenticando: boolean; returnUrl: string; constructor( private route: ActivatedRoute, private router: Router...
GustavoLAF/Gerenciador-de-Planos-de-Aula
Sistema de Gestao Academico/Web/ClientApp/src/app/login/login.component.ts
TypeScript
MethodDeclaration
ngOnInit() { this.authService.sair(); this.returnUrl = this.route.snapshot.queryParams['returnUrl'] || '/'; }
GustavoLAF/Gerenciador-de-Planos-de-Aula
Sistema de Gestao Academico/Web/ClientApp/src/app/login/login.component.ts
TypeScript
MethodDeclaration
login() { this.autenticando = true; this.authService.entrar(this.credencial.email, this.credencial.senha) .subscribe( data => { this.router.navigate([this.returnUrl]); }, error => { this.credencial.senha = null; this.alertService.error(error); ...
GustavoLAF/Gerenciador-de-Planos-de-Aula
Sistema de Gestao Academico/Web/ClientApp/src/app/login/login.component.ts
TypeScript
ClassDeclaration
/** * It could be useful to isolate your music & sounds on several tracks to better manage volume on a grouped instance of sounds. * It will be also used in a future release to apply effects on a specific track. * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#using-sound-tracks */ export class ...
10088/Babylon.js
src/Audio/soundTrack.ts
TypeScript
InterfaceDeclaration
/** * Options allowed during the creation of a sound track. */ export interface ISoundTrackOptions { /** * The volume the sound track should take during creation */ volume?: number; /** * Define if the sound track is the main sound track of the scene */ mainTrack?: boolea...
10088/Babylon.js
src/Audio/soundTrack.ts
TypeScript
MethodDeclaration
private _initializeSoundTrackAudioGraph() { if (Engine.audioEngine?.canUseWebAudio && Engine.audioEngine.audioContext) { this._outputAudioNode = Engine.audioEngine.audioContext.createGain(); this._outputAudioNode.connect(Engine.audioEngine.masterGain); if (this._option...
10088/Babylon.js
src/Audio/soundTrack.ts
TypeScript
MethodDeclaration
/** * Release the sound track and its associated resources */ public dispose(): void { if (Engine.audioEngine && Engine.audioEngine.canUseWebAudio) { if (this._connectedAnalyser) { this._connectedAnalyser.stopDebugCanvas(); } while (this.sound...
10088/Babylon.js
src/Audio/soundTrack.ts
TypeScript
MethodDeclaration
/** * Adds a sound to this sound track * @param sound define the sound to add * @ignoreNaming */ public addSound(sound: Sound): void { if (!this._isInitialized) { this._initializeSoundTrackAudioGraph(); } if (Engine.audioEngine?.canUseWebAudio && this._out...
10088/Babylon.js
src/Audio/soundTrack.ts
TypeScript
MethodDeclaration
/** * Removes a sound to this sound track * @param sound define the sound to remove * @ignoreNaming */ public removeSound(sound: Sound): void { var index = this.soundCollection.indexOf(sound); if (index !== -1) { this.soundCollection.splice(index, 1); } ...
10088/Babylon.js
src/Audio/soundTrack.ts
TypeScript
MethodDeclaration
/** * Set a global volume for the full sound track. * @param newVolume Define the new volume of the sound track */ public setVolume(newVolume: number): void { if (Engine.audioEngine?.canUseWebAudio && this._outputAudioNode) { this._outputAudioNode.gain.value = newVolume; ...
10088/Babylon.js
src/Audio/soundTrack.ts
TypeScript
MethodDeclaration
/** * Switch the panning model to HRTF: * Renders a stereo output of higher quality than equalpower — it uses a convolution with measured impulse responses from human subjects. * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#creating-a-spatial-3d-sound */ public switchPanningMod...
10088/Babylon.js
src/Audio/soundTrack.ts
TypeScript
MethodDeclaration
/** * Switch the panning model to Equal Power: * Represents the equal-power panning algorithm, generally regarded as simple and efficient. equalpower is the default value. * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#creating-a-spatial-3d-sound */ public switchPanningModelToE...
10088/Babylon.js
src/Audio/soundTrack.ts
TypeScript
MethodDeclaration
/** * Connect the sound track to an audio analyser allowing some amazing * synchronization between the sounds/music and your visualization (VuMeter for instance). * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#using-the-analyser * @param analyser The analyser to connect to the ...
10088/Babylon.js
src/Audio/soundTrack.ts
TypeScript
ClassDeclaration
export class Role extends Entity<RoleProps> { get roleId() { return UserId.create(this._id).getValue(); } get name() { return this.props.name; } get contextType() { return this.props.contextType; } get permissions() { return this.props.permissions; } private constructor(props: Rol...
bartstc/it-job-search-engine-nestjs-ddd-cqrs
src/modules/users/domain/role.ts
TypeScript
InterfaceDeclaration
export interface RoleProps { name: RoleName; contextType: ContextType; permissions: string[]; }
bartstc/it-job-search-engine-nestjs-ddd-cqrs
src/modules/users/domain/role.ts
TypeScript
MethodDeclaration
public static create(props: RoleProps, id?: UniqueEntityID): Result<Role> { const guardResult = Guard.againstNullOrUndefinedBulk([ { argument: props.name, argumentPath: 'roleName' }, { argument: props.contextType, argumentPath: 'contextType' }, { argument: props.permissions, argumentPath: 'permis...
bartstc/it-job-search-engine-nestjs-ddd-cqrs
src/modules/users/domain/role.ts
TypeScript
ArrowFunction
(parameters: ParameterObject[], isPaginated: boolean = false): ParameterObject[] => { const optionalParameters = isPaginated ? paginationParameters : []; return [...parameters, ...optionalParameters]; }
0xProject/0x-monorepo
packages/sra-spec/src/parameters.ts
TypeScript
ArrowFunction
() => { let runner: SchematicTestRunner; let tree: UnitTestTree; beforeEach(async () => { runner = new SchematicTestRunner('migrations', migrationCollection); tree = await runner .runExternalSchematicAsync('@schematics/angular', 'workspace', workspaceOptions) .toPromise(); tree = await r...
schlpbch/sbb-angular
src/angular-business/schematics/ng-update/index.spec.ts
TypeScript
ArrowFunction
async () => { runner = new SchematicTestRunner('migrations', migrationCollection); tree = await runner .runExternalSchematicAsync('@schematics/angular', 'workspace', workspaceOptions) .toPromise(); tree = await runner .runExternalSchematicAsync('@schematics/angular', 'application', appOpt...
schlpbch/sbb-angular
src/angular-business/schematics/ng-update/index.spec.ts
TypeScript
ArrowFunction
() => { it('should add @sbb-esta/angular-core to "package.json" file', async () => { expect( readJsonFile(tree, '/package.json').dependencies['@sbb-esta/angular-core'] ).toBeUndefined(); await runner.runSchematicAsync('migration-v9', {}, tree).toPromise(); expect( JSON.par...
schlpbch/sbb-angular
src/angular-business/schematics/ng-update/index.spec.ts
TypeScript
ArrowFunction
async () => { expect( readJsonFile(tree, '/package.json').dependencies['@sbb-esta/angular-core'] ).toBeUndefined(); await runner.runSchematicAsync('migration-v9', {}, tree).toPromise(); expect( JSON.parse(tree.readContent('/package.json')).dependencies['@sbb-esta/angular-core'...
schlpbch/sbb-angular
src/angular-business/schematics/ng-update/index.spec.ts
TypeScript
ArrowFunction
(t) => t.name === 'node-package'
schlpbch/sbb-angular
src/angular-business/schematics/ng-update/index.spec.ts
TypeScript
ArrowFunction
async () => { addDefaultDependency('@sbb-esta/angular-core', '0.0.0', tree); expect(readJsonFile(tree, '/package.json').dependencies['@sbb-esta/angular-core']).toBe( '0.0.0' ); await runner.runSchematicAsync('migration-v9', {}, tree).toPromise(); expect(readJsonFile(tree, '/pac...
schlpbch/sbb-angular
src/angular-business/schematics/ng-update/index.spec.ts
TypeScript
ArrowFunction
() => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ ContentHeaderComponent ], }).compileComponents() })) it('should create the component', async(() => { const fixture = TestBed.createComponent(ContentHeaderComponent) const app = fixture.debugElem...
LeonardoHabitzreuter/pokemon-coach
src/app/shared/content-header/content-header.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [ ContentHeaderComponent ], }).compileComponents() }
LeonardoHabitzreuter/pokemon-coach
src/app/shared/content-header/content-header.component.spec.ts
TypeScript
ArrowFunction
() => { const fixture = TestBed.createComponent(ContentHeaderComponent) const app = fixture.debugElement.componentInstance expect(app).toBeTruthy() }
LeonardoHabitzreuter/pokemon-coach
src/app/shared/content-header/content-header.component.spec.ts
TypeScript
ArrowFunction
() => { const fixture = TestBed.createComponent(ContentHeaderComponent) fixture.componentInstance.title = 'Hello world!' fixture.detectChanges() const compiled = fixture.debugElement.nativeElement expect(compiled.querySelector('h1').textContent).toContain('Hello world!') }
LeonardoHabitzreuter/pokemon-coach
src/app/shared/content-header/content-header.component.spec.ts
TypeScript
ClassDeclaration
@Injectable() export class ModalErrorHandler { constructor(private modal: ModalService) { } handleError(error: Error) { const component = this.modal.fromComponent(ErrorReportComponent, {title: "An error has occured"}); component.code = error.toString(); component.textarea.nativ...
BGI-flexlab/composer
src/app/core/error-report/modal-error-handler.ts
TypeScript
MethodDeclaration
handleError(error: Error) { const component = this.modal.fromComponent(ErrorReportComponent, {title: "An error has occured"}); component.code = error.toString(); component.textarea.nativeElement.value = error.message + "\n\n" + error.stack; }
BGI-flexlab/composer
src/app/core/error-report/modal-error-handler.ts
TypeScript
ArrowFunction
({ size }: IconProps) => ( <svg viewBox="0 0 30 30"
guardian/source
packages/@guardian/src-icons/arrow-up-straight.tsx
TypeScript
ArrowFunction
(epoch: number): IDeliState => { return { clients: undefined, durableSequenceNumber: 0, epoch, expHash1: defaultHash, logOffset: -1, sequenceNumber: 0, signalClientConnectionNumber: 0, term: 1, lastSentMSN: 0, nackMessages: undefined, ...
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
ArrowFunction
(closeType) => { const handler = async () => { if ((closeType === LambdaCloseType.ActivityTimeout || closeType === LambdaCloseType.Error)) { const query = { documentId, tenantId, session: { $exists: true } }; const data = { "session.isSessionAlive": f...
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
ArrowFunction
async () => { if ((closeType === LambdaCloseType.ActivityTimeout || closeType === LambdaCloseType.Error)) { const query = { documentId, tenantId, session: { $exists: true } }; const data = { "session.isSessionAlive": false }; await this.collec...
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
ArrowFunction
(e) => { context.log?.error(`Failed to handle isSessionAlive with exception ${e}` , { messageMetaData }); }
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
ArrowFunction
(value) => value.path !== ".serviceProtocol"
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
ArrowFunction
(value) => { const createTreeEntry: ICreateTreeEntry = { mode: value.mode, path: value.path, sha: value.sha, type: value.type, }; return createTreeEntry; }
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
MethodDeclaration
public async create(config: IPartitionLambdaConfig, context: IContext): Promise<IPartitionLambda> { const { documentId, tenantId, leaderEpoch } = config; const sessionMetric = createSessionMetric(tenantId, documentId, LumberEventName.SessionResult, this.serviceConfiguration); const ...
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
MethodDeclaration
private logSessionFailureMetrics( sessionMetric: Lumber<LumberEventName.SessionResult> | undefined, sessionStartMetric: Lumber<LumberEventName.StartSessionResult> | undefined, errMsg: string) { sessionMetric?.error(errMsg); sessionStartMetric?.error(errMsg); }
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
MethodDeclaration
public async dispose(): Promise<void> { const mongoClosedP = this.operationsDbMongoManager.close(); const forwardProducerClosedP = this.forwardProducer.close(); const signalProducerClosedP = this.signalProducer?.close(); const reverseProducerClosedP = this.reverseProducer.close(); ...
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
MethodDeclaration
// Fetches last durable deli state from summary. Returns undefined if not present. private async loadStateFromSummary( tenantId: string, documentId: string, gitManager: IGitManager, logger: ILogger | undefined): Promise<IDeliState | undefined> { const existingRef = await gitManag...
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
MethodDeclaration
// Check the current epoch with last epoch. If not matched, we need to flip the term. // However, we need to store the current term and epoch reliably before we kick off the lambda. // Hence we need to create another summary. Logically its an update but in a git sense, // its a new commit in the chain. // Another aspec...
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
MethodDeclaration
private async createSummaryWithLatestTerm( gitManager: IGitManager, checkpoint: IDeliState, documentId: string) { const existingRef = await gitManager.getRef(encodeURIComponent(documentId)); const [lastCommit, scribeContent] = await Promise.all([ gitManager.getCommit...
dstanesc/FluidFramework
server/routerlicious/packages/lambdas/src/deli/lambdaFactory.ts
TypeScript
ArrowFunction
() => { return ( <Layout> <SEO title="Articles archive" /> <h2>All articles</h2> <AllArticles /> </Layout>
pasierb/digital-garden
src/pages/articles.tsx
TypeScript
ClassDeclaration
/** * Renders a native WebView. */ declare class WebView extends React.Component<AndroidWebViewProps, State> { static defaultProps: { overScrollMode: string; javaScriptEnabled: boolean; thirdPartyCookiesEnabled: boolean; scalesPageToFit: boolean; allowsFullscreenVideo: bool...
alfi-jarlath/react-native-webview
lib/WebView.android.d.ts
TypeScript
ArrowFunction
() => { it("should render", () => { const { container, asFragment } = render( <Tabs> <TabList> <Tab tabId={1}>First</Tab> <Tab tabId={2}>Second</Tab> <Tab tabId={3}>Third</Tab> </TabList> <div className="mt-5"> <TabPanel tabId={1}>1</TabPanel> <TabPanel tabId={2}>2</TabPanel>...
ArkEcosystem/ark-desktop
src/app/components/Tabs/Tabs.test.tsx
TypeScript
ArrowFunction
() => { const { container, asFragment } = render( <Tabs> <TabList> <Tab tabId={1}>First</Tab> <Tab tabId={2}>Second</Tab> <Tab tabId={3}>Third</Tab> </TabList> <div className="mt-5"> <TabPanel tabId={1}>1</TabPanel> <TabPanel tabId={2}>2</TabPanel> <TabPanel tabId={3}>3</...
ArkEcosystem/ark-desktop
src/app/components/Tabs/Tabs.test.tsx
TypeScript
ArrowFunction
() => { const { container, asFragment } = render( <Tabs> <TabList noBackground> <Tab tabId={1} count={1}> First </Tab> <Tab tabId={2} count={2}> Second </Tab> <Tab tabId={3} count={3}> Third </Tab> </TabList> <div className="mt-5"> <TabPanel tabId={...
ArkEcosystem/ark-desktop
src/app/components/Tabs/Tabs.test.tsx
TypeScript
ArrowFunction
() => { const { container, asFragment } = render( <Tabs> <TabList noBackground> <Tab tabId={1}>First</Tab> <Tab tabId={2}>Second</Tab> <Tab tabId={3}>Third</Tab> </TabList> <div className="mt-5"> <TabPanel tabId={1}>1</TabPanel> <TabPanel tabId={2}>2</TabPanel> <TabPanel ...
ArkEcosystem/ark-desktop
src/app/components/Tabs/Tabs.test.tsx
TypeScript
ArrowFunction
() => { const { container, asFragment, getByTestId } = render( <Tabs activeId={2}> <TabList> <Tab tabId={1}>First</Tab> <Tab tabId={2}>Second</Tab> </TabList> <TabPanel tabId={1}>1</TabPanel> <TabPanel tabId={2}>2</TabPanel> </Tabs>, ); fireEvent.click(getByTestId("tabs__tab-butt...
ArkEcosystem/ark-desktop
src/app/components/Tabs/Tabs.test.tsx
TypeScript
ArrowFunction
() => { const { getByTestId } = render( <Tabs activeId={1}> <TabList> <Tab tabId={1}>First</Tab> <div>separator</div> <Tab tabId={2}>Second</Tab> </TabList> <TabPanel tabId={1}>1</TabPanel> <TabPanel tabId={2}>2</TabPanel> </Tabs>, ); const firstTab = getByTestId("tabs__tab-...
ArkEcosystem/ark-desktop
src/app/components/Tabs/Tabs.test.tsx
TypeScript
FunctionDeclaration
function assertNotEOF<T extends {}>(val: T | Deno.EOF): T { assertNotEquals(val, Deno.EOF); return val as T; }
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
ArrowFunction
(): void => {}
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
ArrowFunction
async (): Promise<number | Deno.EOF> => { return 0; }
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
ArrowFunction
async (): Promise<number> => { return -1; }
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
ArrowFunction
async (): Promise<number | Deno.EOF> => { return 0; }
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
ArrowFunction
async (): Promise<number> => { return -1; }
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
ArrowFunction
(): void => { serverIsRunning = false; }
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
ArrowFunction
(_): void => {}
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
InterfaceDeclaration
interface ResponseTest { response: Response; raw: string; }
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
TypeAliasDeclaration
type Handler = () => void;
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
MethodDeclaration
fn(): void { const testCases = [ { in: "HTTP/0.9", want: [0, 9] }, { in: "HTTP/1.0", want: [1, 0] }, { in: "HTTP/1.1", want: [1, 1] }, { in: "HTTP/3.14", want: [3, 14] }, { in: "HTTP", err: true }, { in: "HTTP/one.one", err: true }, { in: "HTTP/1.1/", err: true }, { ...
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
MethodDeclaration
async fn(): Promise<void> { // Runs a simple server as another process const p = Deno.run({ args: [Deno.execPath(), "http/testdata/simple_server.ts", "--allow-net"], stdout: "piped" }); try { const r = new TextProtoReader(new BufReader(p.stdout!)); const s = await r.readLine();...
AleksandrukTad/deno
std/http/server_test.ts
TypeScript
ClassDeclaration
export default class ControllerProvider { static init(){ const router = new Router(); router.use(UserController); return router.routes(); } }
caltras/koa-ts-boilerplate
src/controller/index.ts
TypeScript
MethodDeclaration
static init(){ const router = new Router(); router.use(UserController); return router.routes(); }
caltras/koa-ts-boilerplate
src/controller/index.ts
TypeScript
ClassDeclaration
export class ImprovementActionButton { _text: string; _cssClass: string; // TODO(#7165): Replace 'any' with the exact type. This has been kept as // 'any' because '_actionFunc' is a function with varying return types // depending upon the arguments paased to the constructor of // 'ImprovementActionButton'....
anilseyrek/oppia
core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts
TypeScript
ClassDeclaration
@Injectable({ providedIn: 'root' }) export class ImprovementActionButtonObjectFactory { /** * @returns {ImprovementActionButton} * @param {string} text - The text displayed on the button. * @param {callback} actionFunc - Function to run when the button is * clicked. * @param {string} [cssClass=bt...
anilseyrek/oppia
core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts
TypeScript
MethodDeclaration
/** @returns {string} - The text of the action (text rendered in button). */ getText(): string { return this._text; }
anilseyrek/oppia
core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts
TypeScript
MethodDeclaration
/** Returns the CSS class of the button. */ getCssClass(): string { return this._cssClass; }
anilseyrek/oppia
core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts
TypeScript
MethodDeclaration
/** Performs the associated action and return its result. */ // TODO(#7165): Replace 'any' with the exact type. This has been kept as // 'any' because '_actionFunc' is a function with varying return types // depending upon the arguments paased to the constructor of // 'ImprovementActionButton'. execute(): any { ret...
anilseyrek/oppia
core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts
TypeScript
MethodDeclaration
/** * @returns {ImprovementActionButton} * @param {string} text - The text displayed on the button. * @param {callback} actionFunc - Function to run when the button is * clicked. * @param {string} [cssClass=btn-default] - The CSS class to render the * button with. */ // TODO(#7165): Replace '...
anilseyrek/oppia
core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts
TypeScript
FunctionDeclaration
export declare function getFragmentShaderSource(sharedDimension: number, aOrientation: MatrixOrientation, bOrientation: MatrixOrientation): string;
MindExMachina/teachable-machina
deeplearn/dist/src/math/webgl/mulmat_packed_gpu.d.ts
TypeScript
FunctionDeclaration
export declare function multiplyMatrixPacked(gpgpu: GPGPUContext, multiplyProgram: WebGLProgram, a: WebGLTexture, b: WebGLTexture, result: WebGLTexture, resultShapeRowCol: [number, number]): void;
MindExMachina/teachable-machina
deeplearn/dist/src/math/webgl/mulmat_packed_gpu.d.ts
TypeScript
FunctionDeclaration
export declare function uploadMultiplyMatrixPackedDownload(a: Float32Array, aShapeRowCol: [number, number], b: Float32Array, bShapeRowCol: [number, number], aOrientation?: MatrixOrientation, bOrientation?: MatrixOrientation): Float32Array;
MindExMachina/teachable-machina
deeplearn/dist/src/math/webgl/mulmat_packed_gpu.d.ts
TypeScript
FunctionDeclaration
export function translateYOutputRangeFor({ position, height, topOffset, bottomOffset, keyboardHeight, keyboardOffset }: UseSlideAnimationParams & { keyboardHeight: number; }) { const offset = position === 'bottom' ? bottomOffset : topOffset; const keyboardAwareOffset = position === 'bottom' ? key...
Hakeemmidan/react-native-toast-message
src/hooks/useSlideAnimation.ts
TypeScript
FunctionDeclaration
export function useSlideAnimation({ position, height, topOffset, bottomOffset, keyboardOffset }: UseSlideAnimationParams) { const animatedValue = React.useRef(new Animated.Value(0)); const { keyboardHeight } = useKeyboard(); const animate = React.useCallback((toValue: number) => { Animated.spring(...
Hakeemmidan/react-native-toast-message
src/hooks/useSlideAnimation.ts
TypeScript
ArrowFunction
(toValue: number) => { Animated.spring(animatedValue.current, { toValue, useNativeDriver: true, friction: 8 }).start(); }
Hakeemmidan/react-native-toast-message
src/hooks/useSlideAnimation.ts
TypeScript
TypeAliasDeclaration
type UseSlideAnimationParams = { position: ToastPosition; height: number; topOffset: number; bottomOffset: number; keyboardOffset: number; };
Hakeemmidan/react-native-toast-message
src/hooks/useSlideAnimation.ts
TypeScript
FunctionDeclaration
function SearchPeoples(props: React.SVGProps<SVGSVGElement>, svgRef?: React.Ref<SVGSVGElement>) { return ( <svg width="1em" height="1em" viewBox="0 0 14 14" fill="currentColor" ref={svgRef} {...props}> <path d="M6.125 11.375A5.25 5.25 0 106.124.874a5.25 5.25 0 00.001 10.501zm0 .875a6.125 6.125 0 110-12.25 ...
koenw/fullstack-hello
frontend/node_modules/.pnpm/@rsuite+icon-font@4.0.0/node_modules/@rsuite/icon-font/components/legacy/SearchPeoples.tsx
TypeScript
ArrowFunction
({access}) => { localStorage.setItem('atm-auth-token', access); this.setAccessToken(access); }
yuramorozov01/bank_system
bank/webclient/bank/src/app/shared/services/auth/atm-auth/atm-auth.service.ts
TypeScript
ClassDeclaration
@Injectable({ providedIn: 'root' }) export class AtmAuthService { private access: string = null; constructor(private http: HttpClient, private parserService: ParserService) { } auth(formGroup: FormGroup) : Observable<IAccess>{ const formData = this.parserService.getValuesFromFormGroup(...
yuramorozov01/bank_system
bank/webclient/bank/src/app/shared/services/auth/atm-auth/atm-auth.service.ts
TypeScript
MethodDeclaration
auth(formGroup: FormGroup) : Observable<IAccess>{ const formData = this.parserService.getValuesFromFormGroup(formGroup); return this.http.post<IAccess>('/api/v1/bank_card/auth/', formData) .pipe( tap( ({access}) => { localStorage.setItem...
yuramorozov01/bank_system
bank/webclient/bank/src/app/shared/services/auth/atm-auth/atm-auth.service.ts
TypeScript
MethodDeclaration
setAccessToken(access: string) { this.access = access; }
yuramorozov01/bank_system
bank/webclient/bank/src/app/shared/services/auth/atm-auth/atm-auth.service.ts
TypeScript
MethodDeclaration
getAccessToken(): string { return this.access; }
yuramorozov01/bank_system
bank/webclient/bank/src/app/shared/services/auth/atm-auth/atm-auth.service.ts
TypeScript
MethodDeclaration
isAuthenticated(): boolean { return !!this.access; }
yuramorozov01/bank_system
bank/webclient/bank/src/app/shared/services/auth/atm-auth/atm-auth.service.ts
TypeScript
MethodDeclaration
logout() { this.setAccessToken(null); localStorage.removeItem('atm-auth-token') }
yuramorozov01/bank_system
bank/webclient/bank/src/app/shared/services/auth/atm-auth/atm-auth.service.ts
TypeScript
FunctionDeclaration
function SwitchMode({ hasWeb3, theme, updateTheme }: switchThemeProps) { const handleChangeTheme = () => { if (theme === 'light') updateTheme('dark'); else updateTheme('light'); }; return ( <Button icon={theme === 'dark' ? <IconStar /> : <IconStarFilled />}
DeadSetDollar/dashboard
src/components/Footer/SwitchTheme.tsx
TypeScript
ArrowFunction
() => { if (theme === 'light') updateTheme('dark'); else updateTheme('light'); }
DeadSetDollar/dashboard
src/components/Footer/SwitchTheme.tsx
TypeScript
TypeAliasDeclaration
type switchThemeProps = { hasWeb3: boolean, theme: string, updateTheme: Function }
DeadSetDollar/dashboard
src/components/Footer/SwitchTheme.tsx
TypeScript
FunctionDeclaration
function addCommentBeforeJSX( j: core.JSCodeshift, element: NodePath, message: string, ) { function clean(value: string) { return value .replace(/[ \t]{2,}/g, ' ') .replace(/^[ \t]*/gm, '') .trim(); } const content = `\nTODO: (@codeshift) ${clean(message)}\n`; const comment = j.com...
AlexRogalskiy/CodeshiftCommunity
community/@atlaskit__menu/0.7.0/transform.ts
TypeScript
FunctionDeclaration
function clean(value: string) { return value .replace(/[ \t]{2,}/g, ' ') .replace(/^[ \t]*/gm, '') .trim(); }
AlexRogalskiy/CodeshiftCommunity
community/@atlaskit__menu/0.7.0/transform.ts
TypeScript
FunctionDeclaration
function updateCssFnProp( j: core.JSCodeshift, source: ReturnType<typeof j>, specifier: string, ) { source.findJSXElements(specifier).forEach(element => { const cssFnPropCollection = getJSXAttributes(j, element, 'cssFn'); // no cssProp usage for this element if (!cssFnPropCollection.length) return...
AlexRogalskiy/CodeshiftCommunity
community/@atlaskit__menu/0.7.0/transform.ts
TypeScript
FunctionDeclaration
export default function transformer( fileInfo: FileInfo, { jscodeshift: j }: API, options: Options, ) { const source = j(fileInfo.source); if (!hasImportDeclaration(j, source, '@atlaskit/menu')) { return fileInfo.source; } const defaultSpecifier = getDefaultImportSpecifierName( j, source, ...
AlexRogalskiy/CodeshiftCommunity
community/@atlaskit__menu/0.7.0/transform.ts
TypeScript
ArrowFunction
element => { const cssFnPropCollection = getJSXAttributes(j, element, 'cssFn'); // no cssProp usage for this element if (!cssFnPropCollection.length) return; const cssFnProp = cssFnPropCollection.get(); const cssFnExpression = cssFnPropCollection .find(j.JSXExpressionContainer) .find...
AlexRogalskiy/CodeshiftCommunity
community/@atlaskit__menu/0.7.0/transform.ts
TypeScript
ArrowFunction
n => { // discerns whether there are multiple identifiers here const isComplexIdentifier = j(n).find(j.Identifier).length > 1; if (isComplexIdentifier) { throw new Error( 'CSSFn Prop codemod: Unable to parse spread element', ); ...
AlexRogalskiy/CodeshiftCommunity
community/@atlaskit__menu/0.7.0/transform.ts
TypeScript
ArrowFunction
node => node.value.name === stylePropName.name
AlexRogalskiy/CodeshiftCommunity
community/@atlaskit__menu/0.7.0/transform.ts
TypeScript