type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
TypeAliasDeclaration |
type Styles = { readonly [key: string]: string } | AudiusProject/protocol-dashboard | src/utils/mobile.ts | TypeScript |
ArrowFunction |
(event: any) => {
// tslint:disable-next-line:no-unused-expression
new qq.maps.Marker({
position: event.latLng,
map: this.map,
});
this.zone.run(() => {
this.status = `click ${+new Date()}`;
});
} | cipchk/angular-qq-maps | src/app/components/demo.component.ts | TypeScript |
ArrowFunction |
() => {
this.status = `click ${+new Date()}`;
} | cipchk/angular-qq-maps | src/app/components/demo.component.ts | TypeScript |
ArrowFunction |
(eventName) => {
qq.maps.event.clearListeners(this.map, eventName);
} | cipchk/angular-qq-maps | src/app/components/demo.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'demo',
templateUrl: './demo.component.html',
styleUrls: ['./demo.component.scss'],
encapsulation: ViewEncapsulation.None,
})
export class DemoComponent implements OnDestroy {
constructor(private el: ElementRef, private zone: NgZone) {}
options: any = {};
status = '';
@ViewChild(... | cipchk/angular-qq-maps | src/app/components/demo.component.ts | TypeScript |
MethodDeclaration |
onReady(mapNative: any): void {
mapNative.setOptions({
zoom: 12,
center: new qq.maps.LatLng(39.916527, 116.397128),
});
this.map = mapNative;
this.status = '加载完成';
// 添加监听事件
qq.maps.event.addListener(this.map, 'click', (event: any) => {
// tslint:disable-next-line:no-unused-ex... | cipchk/angular-qq-maps | src/app/components/demo.component.ts | TypeScript |
MethodDeclaration |
panTo(): void {
this.map.panTo(new qq.maps.LatLng(39.9, 116.4));
} | cipchk/angular-qq-maps | src/app/components/demo.component.ts | TypeScript |
MethodDeclaration |
zoom(): void {
this.map.zoomTo((this.map.getZoom() + 1) % 17);
} | cipchk/angular-qq-maps | src/app/components/demo.component.ts | TypeScript |
MethodDeclaration |
infoWindow(): void {
const infoWin = new qq.maps.InfoWindow({
map: this.map,
});
infoWin.open();
infoWin.setContent('Hello world');
infoWin.setPosition(this.map.getCenter());
} | cipchk/angular-qq-maps | src/app/components/demo.component.ts | TypeScript |
MethodDeclaration |
onReadySatellite(mapNative: any): void {
mapNative.setOptions({
zoom: 14,
center: new qq.maps.LatLng(39.916527, 116.397128),
mapTypeId: qq.maps.MapTypeId.SATELLITE,
});
this.mapSatellite = mapNative;
} | cipchk/angular-qq-maps | src/app/components/demo.component.ts | TypeScript |
MethodDeclaration |
ngOnDestroy(): void {
['click'].forEach((eventName) => {
qq.maps.event.clearListeners(this.map, eventName);
});
} | cipchk/angular-qq-maps | src/app/components/demo.component.ts | TypeScript |
FunctionDeclaration |
export function schemaProviderFromConfig(
config: ApolloConfig
): GraphQLSchemaProvider {
if (isServiceConfig(config)) {
if (config.service.localSchemaFile) {
return new FileSchemaProvider({ path: config.service.localSchemaFile });
}
if (config.service.endpoint) {
return new Introsp... | Akryum/apollo-tooling | packages/apollo-language-server/src/schema/providers/index.ts | TypeScript |
FunctionDeclaration | /**
* @description
* Check if the given label is listed as a label of the given issue
*
* @param {Readonly<Issue>} issue A GitHub issue containing some labels
* @param {Readonly<string>} label The label to check the presence with
*
* @return {boolean} Return true when the given label is also in the given issue l... | Lithrun/stale | src/functions/is-labeled.ts | TypeScript |
FunctionDeclaration |
function cleanLabel(label: Readonly<string>): CleanLabel {
return deburr(label.toLowerCase());
} | Lithrun/stale | src/functions/is-labeled.ts | TypeScript |
ArrowFunction |
(issueLabel: Readonly<Label>): boolean => {
return cleanLabel(label) === cleanLabel(issueLabel.name);
} | Lithrun/stale | src/functions/is-labeled.ts | TypeScript |
InterfaceDeclaration |
export interface PaletteEntry {
label: string;
id: string;
treeId?: string; // totalmente opcional
entries?: PaletteEntry[]; // deve obrigatoriamente ter APENAS ou 'entries' ou 'action'
action?: () => void | Observable<any>; // TODO incluir comportamento com observable
} | gabriel-gn/prisma-components | design-system/projects/lib/src/services/command-palette/models.ts | TypeScript |
InterfaceDeclaration |
export interface PaletteTreeEntry {
label: string;
id: string;
} | gabriel-gn/prisma-components | design-system/projects/lib/src/services/command-palette/models.ts | TypeScript |
ClassDeclaration |
@Module({
imports: [TypeOrmModule.forFeature([User])],
providers: [AuthResolver, AuthService],
})
export class AuthModule {} | faiz-webdev/nestjs-graphql-postgresql-auth-schema-first | src/auth/auth.module.ts | TypeScript |
ArrowFunction |
(siteData: any) => new Site(siteData) | ghgofort/sfcc-metadata-explorer | src/documents/Sites.ts | TypeScript |
ClassDeclaration | /**
* @class
* @classdesc - A class for handling the Sites API document for recieving &
* sending API calls that require the Sites document.
*/
export default class Sites {
public count: number = 0;
public data: Site[] = [];
public expand: string[] = [];
public next: string = '';
public previous: strin... | ghgofort/sfcc-metadata-explorer | src/documents/Sites.ts | TypeScript |
FunctionDeclaration |
export default function generator (test: string[][], options: GeneratorOptions): GeneratorMatch {
const mnemonic = options.withHex
? undefined
: mnemonicGenerate(12);
const seed = mnemonic
? mnemonicToMiniSecret(mnemonic)
: randomAsU8a();
const pair = options.type === 'sr25519'
? sr25519PairF... | nathanwhit/tools | packages/vanitygen/src/generate.ts | TypeScript |
FunctionDeclaration |
function updateEventStatsStdout() {
logUpdate(
COLORS.FG_CYAN +
`Socket count: ${STATS_OBSERVABLE.CONNECTED_SOCKETS.size} | ` +
COLORS.RESET +
COLORS.FG_GREEN +
`Data Events Received: ${STATS_OBSERVABLE.DATA_EVENT_COUNT} | ` +
COLORS.RESET +
COLORS.FG_RED +
`Error Events... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
FunctionDeclaration |
async function assertDatabaseConnection() {
return knexConnection.raw('select 1+1 as result').catch((err: any) => {
console.log('Failed to establish connection to database! Exiting...')
console.log(err)
process.exit(1)
})
} | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
FunctionDeclaration |
function prettyPrintConfig(options) {
console.table({
url: options.url,
db_connection_string: options.db_connection_string,
})
console.table({ headers: options.headers })
console.table({ config: options.config }, [
'label',
'max_connections',
'connections_per_second',
])
console.table({... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
FunctionDeclaration | /**
* =====================
* MAIN PROGRAM CODE
* =====================
*/
export async function main(opts: SubscriptionBenchConfig) {
if (!opts) {
throw new Error("Subscription options invalid");
}
if (!opts.db_connection_string) {
throw new Error("DB Connection String not found");
}
// Open t... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
FunctionDeclaration | /**
* =====================
* EXIT TEARDOWN PROCESS
* =====================
*/
async function exit(socketManager: SocketManager) {
console.log('\nExecuting Teardown Process')
try {
console.log('Starting to close socket connections')
await socketManager.closeSockets()
} catch (error) {
console.log(... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
(conn) => {
conn.socket.sendPacked({ type: GQL.CONNECTION_TERMINATE })
conn.socket.close()
} | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
(conn) => conn.events | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
(url) => new WebSocket(url, 'graphql-ws', { headers }) | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
(event) => event | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
(data) => JSON.stringify(data) | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
(data) => JSON.parse(data as string) | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
() => {
// Print debug message if enabled
if (DEBUG) console.log('Socket ID', this.props.id, 'closed')
// Remove socket ID from Observable ES6 Set of connected sockets
STATS_OBSERVABLE.CONNECTED_SOCKETS.delete(this.props.id)
// If the socket is not currently trying to reconnect, begin try... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
() => {
// Print debug message if enabled
if (DEBUG) console.log('Socket ID', this.props.id, 'connected')
// Add the socket ID to ES6 Set of connected sockets
STATS_OBSERVABLE.CONNECTED_SOCKETS.add(this.props.id)
// Set reconnecting state to false
this.isReconnecting = false
} | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
(data) => console.log('sent', data) | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
(data) => {
switch (data.type) {
case GQL.DATA:
const event = this.makeEventRow({ payload: data.payload, err: false })
if (DEBUG) console.log('CALLED GQL.DATA CASE, GOT EVENT ROW', event)
STATS_OBSERVABLE.DATA_EVENT_COUNT++
this.events.push(event)
break
... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
(err: any) => {
console.log('Failed to establish connection to database! Exiting...')
console.log(err)
process.exit(1)
} | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
() => {
updateEventStatsStdout()
} | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
() => {
socketSpawned++
return socketManager.spawnConnection().then((socket) => {
if (socketSpawned >= MAX_CONNECTIONS) clearInterval(spawnInterval)
})
} | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
(socket) => {
if (socketSpawned >= MAX_CONNECTIONS) clearInterval(spawnInterval)
} | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ArrowFunction |
() => exit(socketManager) | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ClassDeclaration |
export class SocketManager {
private nextSocketId = 1
public connections: { [id: number]: Connection } = {}
public config: SockerManagerConfig
public queryArgGenerator: Iterator<any>
constructor(config: SockerManagerConfig) {
this.config = config
this.queryArgGenerator = argumentGenerator(config.var... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ClassDeclaration |
class Connection {
public eventNumber = 1
public events: Array<any> = []
public socket: WebSocketAsPromised
public isReconnecting: boolean = false
constructor(public props: ConnectionParams) {
this.socket = this.makeSocket()
this.configureMessageHandlers()
}
private makeSocket() {
const { e... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
InterfaceDeclaration | /**
* =====================
* SOCKET MANAGER CLASS
* =====================
*/
export interface SockerManagerConfig {
label: string
endpoint: string
variables: object
headers?: Record<string, string>
maxConnections: number
insertPayloadData: boolean
connectionsPerSecond: number
pgConnectionString: st... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
InterfaceDeclaration |
interface ConnectionParams {
id: number
socketManagerConfig: SockerManagerConfig
queryVariables: object
} | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
TypeAliasDeclaration | /**
* =======================
* SOCKET CONNECTION CLASS
* =======================
*/
export type FormatedError = Error & {
originalError?: any
} | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
MethodDeclaration |
public closeSockets() {
return Promise.all(
Object.values(this.connections).map((conn) => {
conn.socket.sendPacked({ type: GQL.CONNECTION_TERMINATE })
conn.socket.close()
})
)
} | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
MethodDeclaration |
public async insertEvents() {
return Events.query()
.allowInsert('[connection_id, event_number, event_data, event_time]')
.insertGraph(this.allEvents)
} | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
MethodDeclaration |
public async spawnConnection() {
const socketId = this.nextSocketId++
const socketManagerConfig = this.config
const queryVariables = this.queryArgGenerator.next().value
try {
const connection = new Connection({
id: socketId,
queryVariables,
socketManagerConfig,
})
... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
MethodDeclaration |
private makeSocket() {
const { endpoint, headers } = this.props.socketManagerConfig
return new WebSocketAsPromised(endpoint, {
createWebSocket: (url) => new WebSocket(url, 'graphql-ws', { headers }),
extractMessageData: (event) => event,
packMessage: (data) => JSON.stringify(data),
unpa... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
MethodDeclaration | // TODO: Make the retry configurable through config.yaml
@Reattempt({ times: 60, delay: 1000 })
public async startSubscription() {
const socket = this.socket
const { id, queryVariables } = this.props
const { headers, subscriptionString } = this.props.socketManagerConfig
if (DEBUG) console.log('Socket... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
MethodDeclaration |
private makeEventRow({ payload, err }) {
const { label, insertPayloadData } = this.props.socketManagerConfig
return {
label,
is_error: err,
operation_id: 1,
connection_id: this.props.id,
event_number: this.eventNumber++,
event_data: insertPayloadData ? payload : { data: null... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
MethodDeclaration |
private configureMessageHandlers() {
// On socket close:
this.socket.onClose.addListener(() => {
// Print debug message if enabled
if (DEBUG) console.log('Socket ID', this.props.id, 'closed')
// Remove socket ID from Observable ES6 Set of connected sockets
STATS_OBSERVABLE.CONNECTED_SOC... | btodorce/graphql_benchmark | app/subscriptions/src/main.ts | TypeScript |
ClassDeclaration |
@NgModule({
imports: [
RouterModule.forChild(routes)
],
exports: [RouterModule]
})
export class UserRoutingModule { } | eugene-goldberg/SolutionHub | ui/app/user/user-routing.module.ts | TypeScript |
ArrowFunction |
() => {
const arr = new Uint8Array(32);
const output = checksums.crc32(arr);
const expected = 0x190A55AD
expect(output).toEqual(expected);
} | TingDaoK/aws-crt-nodejs | lib/native/checksums.spec.ts | TypeScript |
ArrowFunction |
() => {
let output = 0
for (let i = 0; i < 32; i++) {
output = checksums.crc32(new Uint8Array(1), output)
}
const expected = 0x190A55AD;
expect(output).toEqual(expected);
} | TingDaoK/aws-crt-nodejs | lib/native/checksums.spec.ts | TypeScript |
ArrowFunction |
() => {
const arr = Uint8Array.from(Array(32).keys());
const output = checksums.crc32(arr);
const expected = 0x91267E8A
expect(output).toEqual(expected);
} | TingDaoK/aws-crt-nodejs | lib/native/checksums.spec.ts | TypeScript |
ArrowFunction |
() => {
let output = 0
for (let i = 0; i < 32; i++) {
output = checksums.crc32(Uint8Array.from([i]), output);
}
const expected = 0x91267E8A;
expect(output).toEqual(expected);
} | TingDaoK/aws-crt-nodejs | lib/native/checksums.spec.ts | TypeScript |
ArrowFunction |
() => {
const arr = new Uint8Array(25 * 2**20);
const output = checksums.crc32(arr);
const expected = 0x72103906
expect(output).toEqual(expected);
} | TingDaoK/aws-crt-nodejs | lib/native/checksums.spec.ts | TypeScript |
ArrowFunction |
() => {
const arr = new Uint8Array(32);
const output = checksums.crc32c(arr);
const expected = 0x8A9136AA
expect(output).toEqual(expected);
} | TingDaoK/aws-crt-nodejs | lib/native/checksums.spec.ts | TypeScript |
ArrowFunction |
() => {
let output = 0
for (let i = 0; i < 32; i++) {
output = checksums.crc32c(new Uint8Array(1), output)
}
const expected = 0x8A9136AA;
expect(output).toEqual(expected);
} | TingDaoK/aws-crt-nodejs | lib/native/checksums.spec.ts | TypeScript |
ArrowFunction |
() => {
const arr = Uint8Array.from(Array(32).keys());
const output = checksums.crc32c(arr);
const expected = 0x46DD794E
expect(output).toEqual(expected);
} | TingDaoK/aws-crt-nodejs | lib/native/checksums.spec.ts | TypeScript |
ArrowFunction |
() => {
let output = 0
for (let i = 0; i < 32; i++) {
output = checksums.crc32c(Uint8Array.from([i]), output);
}
const expected = 0x46DD794E;
expect(output).toEqual(expected);
} | TingDaoK/aws-crt-nodejs | lib/native/checksums.spec.ts | TypeScript |
ArrowFunction |
() => {
const arr = new Uint8Array(25 * 2**20);
const output = checksums.crc32c(arr);
const expected = 0xfb5b991d
expect(output).toEqual(expected);
} | TingDaoK/aws-crt-nodejs | lib/native/checksums.spec.ts | TypeScript |
ArrowFunction |
([button_code, game_button]): KeyMap => ({
name: game_button,
game_button: Button[game_button] ?? ControllerButton[game_button],
button_code: Phaser.Gamepad[button_code],
}) | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
([game_button, button_code]): KeyMap => {
const matches = button_code.match(/^(?:(?:(\w+) *\+ *)?(\w+) *\+ *)?(\w+)$/);
if (!matches) console.error("Input not recognized " + button_code);
const get_button_code = (code: string): number =>
gamepad_mappi... | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
(code: string): number =>
gamepad_mapping.find(km => km.name === code)?.button_code ?? Phaser.Gamepad[code] | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
km => km.name === code | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
(code: string): number =>
gamepad_mapping.find(km => km.name === code || km.button_code === Phaser.Gamepad[code])
?.game_button | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
km => km.name === code || km.button_code === Phaser.Gamepad[code] | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
(m, i) => i && m | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
bc => bc !== undefined | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
([button_code, game_buttons]): KeyMap => ({
game_button: null,
game_buttons: game_buttons.map(gb => ControllerButton[gb]),
button_code: Phaser.Gamepad[button_code],
}) | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
gb => ControllerButton[gb] | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
([game_button, key_code]): KeyMap => {
const matches = key_code.match(
/^(?:(?:(?:(ALT|CTRL|SHIFT) *\+ *)?(ALT|CTRL|SHIFT) *\+ *)?(ALT|CTRL|SHIFT) *\+ *)?(\w+)$/
);
if (!matches) console.error("Input not recognized " + key_code);
const... | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
km => km.button_code === button_code | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
km => km.game_button | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
km => km.key_code === key_code | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
button_name => {
this.buttons[Button[button_name]] = new GamepadButton(this, Button[button_name]);
} | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
button_name => {
this.buttons[ControllerButton[button_name]] = new GamepadButton(this, ControllerButton[button_name]);
} | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
bn => bn | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
button_name => {
this.buttons[EngineButton[button_name]] = new GamepadButton(this, EngineButton[button_name]);
} | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
(button: ControllerButton, to: AdvanceButton) => {
this.buttons[button].on_down.add(() => this.on_gamepad_down(to));
this.buttons[button].on_up.add(() => this.on_gamepad_up(to));
} | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
() => this.on_gamepad_down(to) | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
() => this.on_gamepad_up(to) | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
km =>
km.game_button &&
// Check if it's the LAST button of any combo
km.game_buttons?.[km.game_buttons.length - 1] === game_button &&
// Check if it's any button of any combo
// km.game_buttons?.includes(game_button) &&
//... | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
gb => gb === game_button || this.is_down(gb) | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
km => this._on_down(km.game_button) | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
km => km.game_button && km.game_buttons?.includes(game_button) | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
km => this._on_up(km.game_button) | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
(button_code: number) => {
this.is_last_input_gamepad = true;
const game_buttons = Gamepad.transcode_gamepad_button(button_code);
game_buttons.forEach(game_button => this.on_gamepad_down(game_button));
} | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
game_button => this.on_gamepad_down(game_button) | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
(button_code: number) => {
this.is_last_input_gamepad = true;
const game_buttons = Gamepad.transcode_gamepad_button(button_code);
game_buttons.forEach(game_button => this.on_gamepad_up(game_button));
} | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
game_button => this.on_gamepad_up(game_button) | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
(pad: Phaser.SinglePad, index: number, value: number) => {
this.is_last_input_gamepad = true;
const game_buttons = Gamepad.gamepad_stick_mapping.filter(km => km.button_code === index);
game_buttons.forEach(km => {
if (value < -this.stick_dead_zone) this.on_gamepad_d... | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
km => km.button_code === index | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
km => {
if (value < -this.stick_dead_zone) this.on_gamepad_down(km.game_buttons[0]);
else if (value > this.stick_dead_zone) this.on_gamepad_down(km.game_buttons[1]);
else {
this.on_gamepad_up(km.game_buttons[0]);
this.on_gamepad_up... | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
(button_code: number, value: number) => {
this.is_last_input_gamepad = true;
const game_buttons = Gamepad.transcode_gamepad_button(button_code);
game_buttons.forEach(game_button =>
value > this.trigger_dead_zone ? this.on_gamepad_down(game_button) : this.on_gamepad_... | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
game_button =>
value > this.trigger_dead_zone ? this.on_gamepad_down(game_button) : this.on_gamepad_up(game_button) | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
ArrowFunction |
(event: KeyboardEvent) => {
this.is_last_input_gamepad = false;
const game_buttons = Gamepad.keyboard_mapping
.filter(
km =>
km.key_code === event.keyCode &&
(km.key_modifiers?.alt != undefined ? km.key_modifie... | MrBushidoBrownn/goldensun_html5 | base/XGamepad.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.