type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
MethodDeclaration
getDefaultSortOrder(columns?: ColumnProps<T>[]): { sortColumn: any; sortOrder: any; };
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getSortStateFromColumns(columns?: ColumnProps<T>[]): { sortColumn: any; sortOrder: any; };
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getMaxCurrent(total: number): number | undefined;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getSorterFn(state: TableState<T>): ((a: T, b: T) => number) | undefined;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getCurrentPageData(): T[];
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getFlatData(): any[];
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getFlatCurrentPageData(): any[];
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
getLocalData(state?: TableState<T> | null, filter?: boolean): Array<T>;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
setSelectedRowKeys(selectedRowKeys: string[], selectionInfo: SelectionInfo<T>): void;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
toggleSortOrder(column: ColumnProps<T>): void;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
hasPagination(props?: any): boolean;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
isFiltersChanged(filters: TableStateFilters): boolean;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
isSortColumn(column: ColumnProps<T>): boolean;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
prepareParamsArguments(state: any): PrepareParamsArgumentsReturn<T>;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
findColumn(myKey: string | number): undefined;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
createComponents(components?: TableComponents, prevComponents?: TableComponents): void;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
recursiveSort(data: T[], sorterFn: (a: any, b: any) => number): T[];
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
renderPagination(prefixCls: string, paginationPosition: string): JSX.Element | null;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
renderRowSelection({ prefixCls, locale, getPopupContainer, }: { prefixCls: string; locale: TableLocale; getPopupContainer: TableProps<T>['getPopupContainer']; }): ColumnProps<T>[];
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
renderColumnsDropdown({ prefixCls, dropdownPrefixCls, columns, locale, getPopupContainer, }: { prefixCls: string; dropdownPrefixCls: string; columns: ColumnProps<T>[]; locale: TableLocale; getPopupContainer: TableProps<T>['getPopupContainer']; }): any[];
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
MethodDeclaration
renderColumnTitle(title: ColumnProps<T>['title']): React.ReactNode;
mperu92/OpenLab
OpenLab2019/OpenLab/node_modules/antd/es/table/Table.d.ts
TypeScript
FunctionDeclaration
//% block="move $leftrightupdown by $steps" //% group="Moving" /** * moves what blocks you see in the direction you pick */ export function move (leftrightupdown: LeftRightUpDown, steps: number) { for(let i = 0; i < steps; i++) { move_(leftrightupdown, 1) } if (not(disabled_portal == "")) { ...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function move_ (leftrightupdown: LeftRightUpDown, steps: number) { if (leftrightupdown == LeftRightUpDown.Left) { if (not(xy_pos(XY.X) - steps < edge_o_world[0])) { leftright_difference += steps } } else if (leftrightupdown == LeftRightUpDown.Right) { if (not(xy_pos(XY.X) + ...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function not (bool: boolean) { return (!(bool)) }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="move %leftright and %updown by $steps" //% group="Moving" /** * self-explanatory */ export function move_diagonally (leftright: LeftRight, updown: UpDown, steps: number) { for(let i = 0; i < steps; i++) { move__diagonally(leftright, updown, 1) } if (not(disabled_portal == "")) { ...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function move__diagonally (leftright: LeftRight, updown: UpDown, steps: number) { if (leftright == LeftRight.Left) { if (not(xy_pos(XY.X) - steps < edge_o_world[0])) { leftright_difference += steps } } else if (leftright == LeftRight.Right) { if (not(xy_pos(XY.X) + steps > e...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="draw the world" //% group="Diplaying" /** * updates the display of the world so that it moves appropriately */ export function show () { basic.clearScreen() for (let index = 0; index < world.length; index++) { led.plot(world_blocks(XY.X, index) + leftright_difference, world_blocks(XY.Y, inde...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="add a circle at x: $x y: $y with a radius of $radius $filled" //% group="Creating & Destroying" //% radius.fieldOptions.precision=1 //% inlineInputMode=inline /** * adds a circle */ export function add_circle (x: number, y: number, radius: number, filled: FilledUn) { if (filled == FilledUn.Filled) { ...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function add_stuff (x: number, y: number, radius: number) { let diam_stuff = (radius * 2) + 1 let simple = diam_stuff - 2 for(let i = 0; i < diam_stuff; i++) { add(radius + x - i, y + radius) } for(let i = 0; i < diam_stuff; i++) { add(radius + x - i, y - radius) } for(let i...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function destroy_stuff (x: number, y: number, radius: number) { let diam_stuff = (radius * 2) + 1 let simple = diam_stuff - 2 for(let i = 0; i < diam_stuff; i++) { destroy(radius + x - i, y + radius) } for(let i = 0; i < diam_stuff; i++) { destroy(radius + x - i, y - radius) } ...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="add a portal at x: $x y: $y that goes to x: $tox y: $toy and is $_type" //% group="Creating & Destroying" //% inlineInputMode=inline /** * adds a portal */ export function add_portal (x: number, y: number, tox: number, toy: number, _type: OneTwo) { if (_type == OneTwo.OneWay) { portals_one_way.p...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="set the world to $arr" //% group="Dangerous things that can mess up your world" //% inlineInputMode=inline /** * sets the world to this array */ export function set_world (arr: string[]) { world = arr }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="destroy the portal at x: $x y: $y that goes to x: $tox y: $toy and is $_type" //% group="Creating & Destroying" //% inlineInputMode=inline /** * adds a portal */ export function destroy_portal (x: number, y: number, tox: number, toy: number, _type: OneTwo) { if (_type == OneTwo.OneWay) { portals...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="destroy a circle at x: $x y: $y with a radius of $radius $filled" //% group="Creating & Destroying" //% radius.fieldOptions.precision=1 //% inlineInputMode=inline /** * destroys a circle */ export function destroy_circle (x: number, y: number, radius: number, filled: FilledUn) { if (filled == FilledUn.F...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="$xy position" //% group="Position" /** * gives you the x or y position you are at according to what you see */ export function xy_pos (xy: XY) { if (xy == XY.X) { return 2 - leftright_difference } else if (xy == XY.Y) { return 2 - updown_difference } return 0 }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="spawnpoint myself at the current position" //% group="Spawnpoint" /** * sets your spawn point to the position you are at */ export function spawnpoint () { spawn_x = xy_pos(XY.X) spawn_y = xy_pos(XY.Y) }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="set spawnpoint to x: $x y: $y" //% group="Spawnpoint" //% x.min=-9 x.max=99 //% y.min=-9 y.max=99 /** * sets your spawn point to x and y */ export function spawnpoint_at_pos (x: number, y: number) { spawn_x = x spawn_y = y }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="Destroy all blocks" //% group="Creating & Destroying" /** * removes all blocks from the world */ export function destroy_all() { for(let i = 0; i < world.length; i++) { world.pop() } }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="add $details via $xy, at $at_xy" //% group="Creating & Destroying" //% details.defl="0000000000" //% inlineInputMode=inline /** * adds stuff led display style (post in issues on github if you do not understand) */ export function add_advanced (xy: XY, at_xy: number, details: string) { for(let i = 0; i <...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="destroy block at x: $x y: $y" //% group="Creating & Destroying" //% x.min=-9 x.max=99 //% y.min=-9 y.max=99 /** * destroys the blocks at x and y */ export function destroy (x: number, y: number) { if (block_detect(parseFloat(encode(x)), parseFloat(encode(y)))) { world.removeAt(find(x, y)) } ...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="which block is at x: $x y: $y" //% group="Position" //% x.min=-9 x.max=99 //% y.min=-9 y.max=99 /** * finds where the block is in the array */ export function find (x: number, y: number) { return world.indexOf("" + encode(x) + encode(y)) }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="go to spawnpoint" //% group="Position" /** * goes to your spawn point */ export function spawn () { goto(spawn_x, spawn_y) if (not(disabled_portal == "")) { portals_two_way.push(disabled_portal) disabled_portal = "" } }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="go to x: $x y: $y" //% group="Position" //% x.min=-9 x.max=99 //% y.min=-9 y.max=99 /** * goes to x and y */ export function goto (x: number, y: number) { updown_difference = 2 - y leftright_difference = 2 - x if (not(disabled_portal == "")) { portals_two_way.push(disabled_portal) ...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="number of blocks in the world" //% group="Position" /** * gives you the length of the array */ export function world_blocks_detect () { return world.length }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="is there a block at x: $x_pos y: $y_pos" //% group="Detect" //% x_pos.min=-9 x_pos.max=99 //% y_pos.min=-9 y_pos.max=99 /** * checks whether or not there is a block at x and y */ export function block_detect (x_pos: number, y_pos: number) { return find(x_pos, y_pos) != -1 }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="world $xy coordinate at item $place" //% group="Position" //% place.min=1 place.max=11881 /** * gives you the x or y of an item in the array */ export function world_blocks (xy: XY, place: number) { if (xy == XY.X) { return parseFloat(world[place].substr(0, 2)) } else if (xy = XY.Y) { ...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="set edge of the world to minimum x: $min_x maximum x: $max_x minimum y: $min_y maximum y: $max_y" //% group="Position" //% inlineInputMode=inline /** * sets the edge of the world to points */ export function edge (min_x: number, max_x: number, min_y: number, max_y: number) { edge_o_world = [min_x, max_x...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="world (array)" //% group="Position" /** * gives you do the array that you can do whatever you want with */ export function all_world_blocks () { return world }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="destroy by $columnrow at $xy from $from_xy to $to_xy " //% group="Creating & Destroying" //% xy.min=-9 xy.max=99 //% from_xy.min=-9 from_xy.max=99 //% to_xy.min=-9 to_xy.max=99 //% inlineInputMode=inline /** * self-explanatory */ export function destroy_by (columnrow: ColumnRow, xy: number, from_xy: number,...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="add by $columnrow at $xy from $from_xy to $to_xy " //% group="Creating & Destroying" //% xy.min=-9 xy.max=99 //% from_xy.min=-9 from_xy.max=99 //% to_xy.min=-9 to_xy.max=99 //% inlineInputMode=inline /** * self-explanatory */ export function add_by (columnrow: ColumnRow, xy: number, from_xy: number, to_xy: ...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
//% block="add x $x and y $y to the world" //% group="Creating & Destroying" //% x.min=-9 x.max=99 //% y.min=-9 y.max=99 /** * self-explanatory */ export function add (x: number, y: number) { if (not(block_detect(parseFloat(encode(x)), parseFloat(encode(y))))) { world.push("" + encode(x) + encode(y)) }...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function decode (txt: string) { return parseFloat(txt) }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function c1 (txt: string) { return decode(txt.substr(0, 2)) == xy_pos(XY.X) && decode(txt.substr(2, 2)) == xy_pos(XY.Y) }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function c21 (txt: string) { return decode(txt.substr(0, 2)) == xy_pos(XY.X) && decode(txt.substr(2, 2)) == xy_pos(XY.Y) }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function c22 (txt: string) { return decode(txt.substr(4, 2)) == xy_pos(XY.X) && decode(txt.substr(6, 2)) == xy_pos(XY.Y) }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function do_ur_magic1 (txt: string) { if (c1(txt)) { goto(decode(txt.substr(4, 2)), decode(txt.substr(6, 2))) } }
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function do_ur_magic2 (txt: string) { if (c21(txt)) { goto(decode(txt.substr(4, 2)), decode(txt.substr(6, 2))) } else if (c22(txt)) { goto(decode(txt.substr(0, 2)), decode(txt.substr(2, 2))) } else { return } disabled_portal = txt portals_two_way.removeAt(portals_two_way...
joshkordek3/world-game-extension
main.ts
TypeScript
FunctionDeclaration
function encode (oof: number) { temp_txt = convertToText(oof) for (let index4 = 0; index4 < 2 - temp_txt.length; index4++) { temp_txt = "0" + temp_txt } return temp_txt }
joshkordek3/world-game-extension
main.ts
TypeScript
EnumDeclaration
enum LeftRightUpDown { //% block="Left" Left, //% block="Right" Right, //% block="Up" Up, //% block="Down" Down, }
joshkordek3/world-game-extension
main.ts
TypeScript
EnumDeclaration
enum UpDown { //% block="Up" Up, //% block="Down" Down, }
joshkordek3/world-game-extension
main.ts
TypeScript
EnumDeclaration
enum LeftRight { //% block="Left" Left, //% block="Right" Right, }
joshkordek3/world-game-extension
main.ts
TypeScript
EnumDeclaration
enum ColumnRow { //% block="Column" Column, //% block="Row" Row, }
joshkordek3/world-game-extension
main.ts
TypeScript
EnumDeclaration
enum XY { //% block="X" X, //% block="Y" Y, }
joshkordek3/world-game-extension
main.ts
TypeScript
EnumDeclaration
enum FilledUn { //% block="Filled" Filled, //% block="Unfilled" Unfilled, }
joshkordek3/world-game-extension
main.ts
TypeScript
EnumDeclaration
enum OneTwo { //% block="one way" OneWay, //% block="two way" TwoWay, }
joshkordek3/world-game-extension
main.ts
TypeScript
ArrowFunction
(router: Router): ((name: string) => string[]) => ( name: string, ): string[] => { const { routes } = router.getDependencies(); const segments = name.split('.'); const path = []; return segments.reduce((acc, segment): string[] => { path.push(segment); const route = getRoute(path.join('.'), routes); ...
mihanizm56/boilerplate-config-packager
config/packager/utils/source-file-parsers/ssr/sources/_utils/router/_utils/get-chunks.ts
TypeScript
ArrowFunction
( name: string, ): string[] => { const { routes } = router.getDependencies(); const segments = name.split('.'); const path = []; return segments.reduce((acc, segment): string[] => { path.push(segment); const route = getRoute(path.join('.'), routes); return [...acc, ...(route.chunks || [])]; }...
mihanizm56/boilerplate-config-packager
config/packager/utils/source-file-parsers/ssr/sources/_utils/router/_utils/get-chunks.ts
TypeScript
ArrowFunction
(acc, segment): string[] => { path.push(segment); const route = getRoute(path.join('.'), routes); return [...acc, ...(route.chunks || [])]; }
mihanizm56/boilerplate-config-packager
config/packager/utils/source-file-parsers/ssr/sources/_utils/router/_utils/get-chunks.ts
TypeScript
ArrowFunction
(hre) => { if (!hre.deployments) { hre.deployments = new DeploymentsExtensionMock() } }
keep-network/hardhat-helpers
test/fixture-projects/hardhat-deploy-project/hardhat-deploy-mock/index.ts
TypeScript
InterfaceDeclaration
interface MainSectionProps { todos: Seq.Set<TodoItem>; areAllComplete: boolean; setState: StateSetter<TodoAppState>; }
antonycourtney/oneref-examples
jlongster-itemList-async-save/dist/components/MainSection.d.ts
TypeScript
FunctionDeclaration
export function withSDK<T extends Bridge = Bridge>(Base: IConstructor<T>) { const BaseClass = Base as typeof Bridge // 如果不是手机端, 就直接使用 `浏览器` API if (window.isPC) { return BaseClass } class HybridSDK extends BaseClass implements IBridge { hybridSDK: any = {} async initializeSDK(): Promise<void> ...
Leonckq/sdk_bridge
src/sdk/hybrid/withSDK.ts
TypeScript
ClassDeclaration
class HybridSDK extends BaseClass implements IBridge { hybridSDK: any = {} async initializeSDK(): Promise<void> { const { sdkName } = qs.parse(window.location.search.slice(1)) if (sdkName === 'kk') { const { sdk } = await import('./withKKSDK') this.hybridSDK = sdk this.show...
Leonckq/sdk_bridge
src/sdk/hybrid/withSDK.ts
TypeScript
MethodDeclaration
async initializeSDK(): Promise<void> { const { sdkName } = qs.parse(window.location.search.slice(1)) if (sdkName === 'kk') { const { sdk } = await import('./withKKSDK') this.hybridSDK = sdk this.showTitleBar() } }
Leonckq/sdk_bridge
src/sdk/hybrid/withSDK.ts
TypeScript
MethodDeclaration
async close(): Promise<void> { this.hybridSDK.close() }
Leonckq/sdk_bridge
src/sdk/hybrid/withSDK.ts
TypeScript
MethodDeclaration
scan(props: IScanProps = {}): Promise<string> { if (this.hybridSDK.scan) { return this.hybridSDK.scan(props) } return super.scan(props) }
Leonckq/sdk_bridge
src/sdk/hybrid/withSDK.ts
TypeScript
MethodDeclaration
setTitle(title: string): Promise<void> { if (this.hybridSDK.setTilte) { return this.hybridSDK.setTilte(title) } return super.setTitle(title) }
Leonckq/sdk_bridge
src/sdk/hybrid/withSDK.ts
TypeScript
MethodDeclaration
async openLink(link: string, props: ILinkProps = {}): Promise<void> { if (props.iframe) { return super.openURLInIframe(link, props) } if (this.hybridSDK.openLink) { return this.hybridSDK.openLink(link, props) } return super.openLink(link, props) }
Leonckq/sdk_bridge
src/sdk/hybrid/withSDK.ts
TypeScript
MethodDeclaration
async share(props: IShareProps): Promise<void> { if (this.hybridSDK.share) { return this.hybridSDK.share(props) } return super.share(props) }
Leonckq/sdk_bridge
src/sdk/hybrid/withSDK.ts
TypeScript
MethodDeclaration
async preview(url: string, fileName: string = ''): Promise<any> { if (this.hybridSDK.preview) { return this.hybridSDK.preview(url, fileName) } return super.preview(url, fileName) }
Leonckq/sdk_bridge
src/sdk/hybrid/withSDK.ts
TypeScript
MethodDeclaration
async showTitleBar() { if (this.hybridSDK.showTitleBar) { this.hybridSDK.showTitleBar() } }
Leonckq/sdk_bridge
src/sdk/hybrid/withSDK.ts
TypeScript
ClassDeclaration
@NgModule({ declarations: [ HomepageComponent, SupportBotComponent, DynamicComponent, TextMessageComponent, LoadingMessageComponent, MainMenuComponent, ButtonMessageComponent, HealthCheckComponent, TalkToAgentMessageComponent, Feedback...
Sneezry/Azure-AppServices-Diagnostics-Portal
AngularApp/projects/app-service-diagnostics/src/app/supportbot/supportbot.module.ts
TypeScript
ArrowFunction
x => x === waypoint.name
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
ArrowFunction
(unboughtArticle) => { console.log(`${unboughtArticle} couldn't be accquired`) npc.scene.gameLoop.customerHappiness-- }
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
ArrowFunction
(unpayedArticle) => { console.log(`${unpayedArticle} was returned`) npc.scene.gameLoop.money-- if (npc.scene.gameLoop.customerHappiness > 0) { npc.scene.gameLoop.customerHappiness-- } npc.scene.s...
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
ArrowFunction
(pointer: Phaser.Input.Pointer) => { const pointerLocation = npc.scene.input.activePointer.positionToCamera(npc.scene.cameras.main) as Phaser.Math.Vector2; if (pointer.leftButtonDown()) { if (npc.scene.player.interactionRadius.circle.contains(pointerLocation.x, point...
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
ArrowFunction
(boughtArticle) => { console.log(`${boughtArticle} has been sold`) npc.scene.gameLoop.money += 10 if (npc.scene.gameLoop.customerHappiness < 100) { npc.sce...
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
ArrowFunction
item => { this.waypoints.push(scene.checkPoints[item]) if (['Bread', 'Dairy', 'Sweets', 'Cereal', 'Hygiene'].find(x => x === item)) { this.waypoints.push(scene.checkPoints.Hallway2) } else { this.waypoints.push(scene.checkPoints.Hallway) }...
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
ArrowFunction
x => x === item
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
ClassDeclaration
class NPCState { declare wearingMask: boolean declare patienceScore: number declare understandingScore: number declare shoppingList: Articles[] declare shoppingBasket: Articles[] declare waypoints: Phaser.GameObjects.GameObject[] declare currentWaypoint: Phaser.GameObjects.GameObject ...
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
MethodDeclaration
update() { const npc = this let body = npc.sprite.body as Phaser.Physics.Arcade.Body if ( npc.npc_state.stopped || (npc.npc_state.meta.waitUntil && npc.npc_state.meta.waitUntil > npc.scene.gameLoop.totalPlayTime) || (npc.npc_state.meta.waitForCashierUntil &...
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
MethodDeclaration
destroy() { let npc = this npc.destroyed = true npc.sprite.destroy() }
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
MethodDeclaration
private initializeSprite(x: number, y: number, npc: NPC): Phaser.GameObjects.Sprite { let sprite = npc.scene.physics.add.sprite(x, y, "npc_sprite") .setInteractive() .on(Phaser.Input.Events.POINTER_DOWN, (pointer: Phaser.Input.Pointer) => { const pointerLocation = npc.sc...
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
MethodDeclaration
private generateShoppingList(): Articles[] { let amountOfArticles = randomIntFromInterval(1, 10) let shoppingList: Articles[] = [] for (let article = 0; article < amountOfArticles; article++) { shoppingList.push(randomEnum(Articles)) } return shoppingList }
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
MethodDeclaration
private populateWaypointsFromShoppingList(scene: CoronaShopSimScene) { this.shoppingList.forEach(item => { this.waypoints.push(scene.checkPoints[item]) if (['Bread', 'Dairy', 'Sweets', 'Cereal', 'Hygiene'].find(x => x === item)) { this.waypoints.push(scene.checkPoints.Ha...
bmo-at/corona-shop-sim
src/entities/npc.ts
TypeScript
ArrowFunction
async () => connections = await createTestingConnections({ entities: [__dirname + "/entity/*{.js,.ts}"], schemaCreate: true, dropSchemaOnConnection: true, })
hisamu/typeorm
test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-one/multiple-primary-keys-many-to-one.ts
TypeScript
ArrowFunction
() => Promise.all(connections.map(async connection => { const category1 = new Category(); category1.name = "cars"; category1.type = "common-category"; category1.code = 1; category1.version = 1; await connection.manager.save(category1); ...
hisamu/typeorm
test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-one/multiple-primary-keys-many-to-one.ts
TypeScript
ArrowFunction
async connection => { const category1 = new Category(); category1.name = "cars"; category1.type = "common-category"; category1.code = 1; category1.version = 1; await connection.manager.save(category1); const category2 = new Category(...
hisamu/typeorm
test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-one/multiple-primary-keys-many-to-one.ts
TypeScript
ArrowFunction
() => Promise.all(connections.map(async connection => { const category1 = new Category(); category1.name = "cars"; category1.type = "common-category"; category1.code = 1; category1.version = 1; await connection.manager.save(category1); ...
hisamu/typeorm
test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-one/multiple-primary-keys-many-to-one.ts
TypeScript
ArrowFunction
async connection => { const category1 = new Category(); category1.name = "cars"; category1.type = "common-category"; category1.code = 1; category1.version = 1; await connection.manager.save(category1); const category2 = new Category(...
hisamu/typeorm
test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-one/multiple-primary-keys-many-to-one.ts
TypeScript
ArrowFunction
() => Promise.all(connections.map(async connection => { const category1 = new Category(); category1.name = "cars"; category1.type = "common-category"; category1.code = 1; category1.version = 1; await connection.manager.save(category1); ...
hisamu/typeorm
test/functional/relations/multiple-primary-keys/multiple-primary-keys-many-to-one/multiple-primary-keys-many-to-one.ts
TypeScript