repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Vanilla/ResourcePack/particles.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
export const Particles: string[] =
[
"minecraft:arrow_spell_emitter",
"minecraft:balloon_gas_particle",
"minecraft:basic_bubble_particle",
"minecraft:basic_bubble_particle_manual",
"minecraft:basic_crit_particle",
"minecraft:basic_flame_particle",
... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/Entity.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
import { Identifiable } from "../Identifiable";
/**
*
*/
export interface Entity extends Identifiable {
/**
*
*/
animations: string[];
}
/**
*
*/
export namespace Entity {
/**
*
* @param value
* @returns
*/
export function is(value... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Vanilla/ResourcePack/materials.ts | <filename>src/Lib/Vanilla/ResourcePack/materials.ts<gh_stars>0
export const Materials: string[] =
[
"agent",
"alpha_block",
"alpha_block_color",
"animated_texture_blit",
"armor",
"armor_enchanted",
"armor_leather",
"armor_leather_enchanted",
"armor_stand",
"arrow",
"ash",
"axolotl",
"axolotl_... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/ResourcePack/animation_controllers.ts | export const AnimationControllers: string[] =
[] |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/General/blocks.ts | <gh_stars>0
import { GeneralBlock } from './format';
export const BlockData: GeneralBlock =
{
"blockstates": [
{
"values": [
"0",
"1"
],
"name": "active",
"type": "byte"
},
{
"values": [
"0",
"1",
"2",
"3",... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/include.ts | /* Auto generated */
export * as Edu from "./Edu/include";
export * as General from "./General/include";
export * as Types from "./Types/include";
export * as Vanilla from "./Vanilla/include";
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/Material.ts | /**
*
*/
export type Material = string;
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | test/Identifiable.test.ts | import { fail } from "assert";
import { expect } from "chai";
import { assert } from "console";
import { Identifiable } from "../src/Lib/Types/Identifiable";
export function Test_Identifiable(data: Identifiable) {
if (Identifiable.is(data)) {
assert(data.id.length > 0, `Not a length on ID: ${JSON.stringify(data)... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/BehaviorPack/trading.ts | export const Trading: string[] =
[] |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | test/utillity.test.ts | import * as path from "path";
export const TestFilesFolder = path.join(__dirname, "..", "..", "test", "files");
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/Identifiable.ts | <filename>src/Lib/Types/Identifiable.ts
/**The interface that governs if a object is identifiable*/
export interface Identifiable {
/**The identifier of this object*/
id: string;
}
/**
*
*/
export namespace Identifiable {
/**
*
* @param value
* @returns
*/
export function is(value: any): value is... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/BehaviorPack/Trading.ts | <filename>src/Lib/Types/BehaviorPack/Trading.ts
/**
*
*/
export type Trading = string;
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Vanilla/ResourcePack/animations.ts | export const Animations: string[] =
[
"animation.actor.billboard",
"animation.agent.move",
"animation.agent.swing_arms",
"animation.armor.boots.offset",
"animation.armor_stand.athena_pose",
"animation.armor_stand.brandish_pose",
"animation.armor_stand.cancan_a_pose",
"animation.armor_stand.cancan_b_pos... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/AnimationController.ts | /**
*
*/
export type AnimationController = string;
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | test/contents/bp/content.test.ts | import { assert } from "console";
import { Block, BlockState } from "../../../src/Lib/Types/BehaviorPack/Block";
import { Entity } from "../../../src/Lib/Types/BehaviorPack/Entity";
import { Item } from "../../../src/Lib/Types/BehaviorPack/Item";
import { MinecraftData } from "../../../src/main";
import { Check_Identif... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Vanilla/BehaviorPack/blocks.ts | <gh_stars>0
import { Block } from '../../Types/BehaviorPack/Block';
export const Blocks: Block[] =
[
{
"id": "minecraft:acacia_button",
"states": [
{
"values": [
"0",
"1"
],
"name": "button_pressed_bit",
"type": "byte"
},
... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/ResourcePack/sounds.ts | export const Sounds: string[] =
[] |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/include.ts | /* Auto generated */
export * as BehaviorPack from "./BehaviorPack/include";
export * as ResourcePack from "./ResourcePack/include";
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | test/contents/rp/content.test.ts | import { expect } from 'chai';
import { assert } from "console";
import { Entity } from "../../../src/Lib/Types/ResourcePack/Entity";
import { MinecraftData } from "../../../src/main";
import { Check_Identifiable, Check_IsFunction, Test_Identifiable } from "../../Identifiable.test";
describe("rp content", () => {
it... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Vanilla/ResourcePack/sounds.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
export const Sounds: string[] =
[
"ambient.basalt_deltas.additions",
"ambient.basalt_deltas.loop",
"ambient.basalt_deltas.mood",
"ambient.candle",
"ambient.cave",
"ambient.crimson_forest.additions",
"ambient.crimson_forest.loop",
"ambient.crimson... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/Texture.ts | /**
*
*/
export type Texture = string;
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/main.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
import { MinecraftDataSet } from "./Lib/Types/MinecraftDataSet";
import { Vanilla, Edu, Types, General as G } from "./Lib/include";
import { Identifiable } from "./Lib/Types/Identifiable";
export { MinecraftDataSet, Vanilla, Edu, Types };
/**The minecraft vanill... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/Model.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data<filename>src/Lib/Types/ResourcePack/Model.ts
/**
*
*/
export type Model = string;
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/MinecraftDataSet.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
import { BehaviorPack } from "./BehaviorPack/BehaviorPack";
import { Identifiable } from "./Identifiable";
import { ResourcePack } from "./ResourcePack/ResourcePack";
/**A dataset of minecraft data*/
export interface MinecraftDataSet {
/**The behavior pack dat... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/BehaviorPack/include.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
/* Auto generated */
export * from "./BehaviorPack";
export * from "./Block";
export * from "./Entity";
export * from "./Item";
export * from "./LootTable";
export * from "./Trading"; |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Vanilla/ResourcePack/fogs.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
export const Fogs: string[] =
[
"minecraft:fog_bamboo_jungle",
"minecraft:fog_bamboo_jungle_hills",
"minecraft:fog_basalt_deltas",
"minecraft:fog_beach",
"minecraft:fog_birch_forest",
"minecraft:fog_birch_forest_hills",
"minecraft:fog_cold_beach",
... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/Animation.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
/**
*
*/
export type Animation = string;
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/ResourcePack/include.ts | /* Auto generated */
export * from "./animation_controllers";
export * from "./animations";
export * from "./entities";
export * from "./fogs";
export * from "./materials";
export * from "./models";
export * from "./particles";
export * from "./render_controllers";
export * from "./sounds";
export * from "./textures"; |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Vanilla/BehaviorPack/trading.ts | <gh_stars>0
export const Trading: string[] =
[
"trading/armorer_trades.json",
"trading/butcher_trades.json",
"trading/cartographer_trades.json",
"trading/cleric_trades.json",
"trading/economy_trades/armorer_trades.json",
"trading/economy_trades/butcher_trades.json",
"trading/economy_trades/cartographer_t... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/BehaviorPack/include.ts | /* Auto generated */
export * from "./blocks";
export * from "./entities";
export * from "./items";
export * from "./loot_tables";
export * from "./trading"; |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/RenderController.ts | /**
*
*/
export type RenderController = string;
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/BehaviorPack/blocks.ts | <filename>src/Lib/Edu/BehaviorPack/blocks.ts<gh_stars>0
import { Block } from '../../Types/BehaviorPack/Block';
export const Blocks: Block[] =
[
{
"id": "minecraft:camera",
"states": []
},
{
"id": "minecraft:chemical_heat",
"states": []
},
{
"id": "minecraft:chemistry_tabl... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/ResourcePack/textures.ts | <filename>src/Lib/Edu/ResourcePack/textures.ts
export const Textures: string[] =
[
"textures/items/photo",
"textures/ui/animation_code_shuffle0",
"textures/ui/animation_code_shuffle1",
"textures/ui/animation_code_shuffle2",
"textures/ui/animation_code_shuffle3",
"textures/ui/animation_code_shuffle4",
"te... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Vanilla/ResourcePack/render_controllers.ts | export const RenderControllers: string[] =
[
"controller.render.agent",
"controller.render.armor",
"controller.render.armor.leather",
"controller.render.armor_stand",
"controller.render.arrow",
"controller.render.axolotl",
"controller.render.bat",
"controller.render.bee",
"controller.render.blaze",
... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/BehaviorPack/loot_tables.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data<gh_stars>0
export const LootTables: string[] =
[] |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/BehaviorPack/Block.ts | import { Identifiable } from "../Identifiable";
/**
*
*/
export interface BlockState {
/**
*
*/
name: string;
/**
*
*/
type: "byte" | "int" | "string";
/**
*
*/
values: string[];
}
/**
*
*/
export namespace BlockState {
/**
*
* @param value
* @returns
*/
export func... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/General/include.ts | <filename>src/Lib/General/include.ts
/* Auto generated */
export * from "./blocks";
export * from "./effects";
export * from "./entities";
export * from "./format"; |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/ResourcePack/models.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
export const Models: string[] =
[] |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/Sound.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
/**
*
*/
export type Sound = string;
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Vanilla/ResourcePack/models.ts | export const Models: string[] =
[
"geometry.agent",
"geometry.armor_stand",
"geometry.arrow",
"geometry.axolotl",
"geometry.bat",
"geometry.bed",
"geometry.bee",
"geometry.blaze",
"geometry.bow_pulling_0",
"geometry.bow_pulling_1",
"geometry.bow_pulling_2",
"geometry.bow_standby",
"geometry.c... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Vanilla/BehaviorPack/entities.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
import { Entity } from '../../Types/BehaviorPack/Entity';
export const Entities: Entity[] =
[
{
"id": "minecraft:area_effect_cloud",
"events": [],
"families": []
},
{
"id": "minecraft:armor_stand",
"events": [],
"fami... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/ResourcePack/materials.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data<gh_stars>0
export const Materials: string[] =
[] |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | test/contents/general/effect.test.ts | <gh_stars>0
import { expect } from "chai";
import { MinecraftData } from "../../../src/main";
describe("General", () => {
it("effect", () => {
expect(MinecraftData.General.Effects).to.not.undefined;
expect(MinecraftData.General.Effects.length).to.be.greaterThan(0);
});
});
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/Particle.ts | /**
*
*/
export type Particle = string;
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Vanilla/BehaviorPack/loot_tables.ts | export const LootTables: string[] =
[
"loot_tables/chests/abandoned_mineshaft.json",
"loot_tables/chests/bastion_bridge.json",
"loot_tables/chests/bastion_hoglin_stable.json",
"loot_tables/chests/bastion_other.json",
"loot_tables/chests/bastion_treasure.json",
"loot_tables/chests/buriedtreasure.json",
"l... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/ResourcePack/fogs.ts | <gh_stars>0
export const Fogs: string[] =
[] |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/ResourcePack/particles.ts | export const Particles: string[] =
[] |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/Fog.ts | /**
*
*/
export type Fog = string;
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/BehaviorPack/entities.ts | <filename>src/Lib/Edu/BehaviorPack/entities.ts<gh_stars>0
import { Entity } from '../../Types/BehaviorPack/Entity';
export const Entities: Entity[] =
[
{
"id": "minecraft:agent",
"events": [],
"families": []
},
{
"id": "minecraft:balloon",
"events": [],
"families": []
},... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/ResourcePack.ts | import { Animation } from "./Animation";
import { AnimationController } from "./AnimationController";
import { Entity } from "./Entity";
import { Fog } from "./Fog";
import { Material } from "./Material";
import { Model } from "./Model";
import { Particle } from "./Particle";
import { RenderController } from "./RenderC... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/ResourcePack/include.ts | <filename>src/Lib/Types/ResourcePack/include.ts
/* Auto generated */
export * from "./Animation";
export * from "./AnimationController";
export * from "./Entity";
export * from "./Fog";
export * from "./Material";
export * from "./Model";
export * from "./Particle";
export * from "./RenderController";
export * from ".... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/include.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data
/* Auto generated */
export * as BehaviorPack from "./BehaviorPack/include";
export * as ResourcePack from "./ResourcePack/include";
export * from "./Identifiable";
export * from "./MinecraftDataSet"; |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/ResourcePack/render_controllers.ts | <reponame>Blockception/BC-Minecraft-Bedrock-Vanilla-Data<gh_stars>0
export const RenderControllers: string[] =
[] |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | test/contents/sanity.ts | <filename>test/contents/sanity.ts
import { expect } from "chai";
import { MinecraftData } from "../../src/main";
describe("Sanity", () => {
it("No undefined", () => {
const object = MinecraftData;
traverse_for_undefined(object, "MinecraftData");
});
});
function traverse_for_undefined(data: any, path: st... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Types/BehaviorPack/LootTable.ts | /**
*
*/
export type LootTable = string;
|
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/Edu/ResourcePack/entities.ts | import { Entity } from '../../Types/ResourcePack/Entity';
export const Entities: Entity[] =
[] |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | test/contents/general/content.test.ts | <gh_stars>0
import { expect } from "chai";
import { MinecraftData } from "../../../src/main";
describe("Lib", () => {
it("entity 1", () => {
const entity = MinecraftData.BehaviorPack.getEntity("minecraft:creeper");
if (!entity) {
expect.fail("Expected an entity object");
}
});
it("entity edu"... |
Blockception/BC-Minecraft-Bedrock-Vanilla-Data | src/Lib/General/format.ts | import { BlockState } from "../Types/BehaviorPack/Block";
/**The summarized data set for blocks in minecraft*/
export interface GeneralBlock {
/**summarized data set of blockstates*/
blockstates: BlockState[];
}
/**Summarized data set for entities in minecraft*/
export interface GeneralEntity {
/**summarized da... |
quicker-js/class-decorator | src/metadatas/index.ts | <gh_stars>0
/**
* metadata
* 元数据的基础模型
*/
export * from './class-metadata';
export * from './declaration-metadata';
export * from './property-metadata';
export * from './method-metadata';
export * from './parameter-metadata';
|
quicker-js/class-decorator | sample/simple-girl.ts | import { entity } from '../src/decorators';
import { SimplePerson } from './simple-person';
@entity({ title: 'SimplePerson' })
/**
* SimpleUsage1
*/
export class SimpleGirl extends SimplePerson {}
|
quicker-js/class-decorator | test/simple-usage-1.spec.ts | <reponame>quicker-js/class-decorator
import 'reflect-metadata';
import { describe, it } from 'mocha';
import { expect } from 'chai';
import { ClassMirror, PropertyMirror } from '../src';
import { SimpleUsage1 } from '../sample/simple-usage-1';
describe('simple-usage-1.spec.ts', () => {
const classMirror = ClassMirro... |
quicker-js/class-decorator | sample/index.ts | <reponame>quicker-js/class-decorator<filename>sample/index.ts
import { SimpleUsage1 } from './simple-usage-1';
SimpleUsage1.getMetadataKeys();
|
quicker-js/class-decorator | src/decorators/entity/index.ts | import { ClassMirror } from '../../mirrors';
import { Metadata, MetadataOption } from './metadata';
/**
* @hide
* entity 装饰器
* @param metadata
*/
export function entity(metadata: MetadataOption): ClassDecorator {
return ClassMirror.createDecorator(new Metadata(metadata));
}
|
quicker-js/class-decorator | sample/simple-usage-3.ts | <reponame>quicker-js/class-decorator
import { entity, param } from '../src/decorators';
import { SimpleUsage2 } from './simple-usage-2';
@entity({ title: 'SimpleUsage3' })
/**
* SimpleUsage1
*/
export class SimpleUsage3 extends SimpleUsage2 {
/**
* test
* @param path
* @param index
*/
public construc... |
quicker-js/class-decorator | test/simple-usage-3.spec.ts | import 'reflect-metadata';
import { describe, it } from 'mocha';
import { expect } from 'chai';
import { ClassMirror } from '../src';
import { SimpleUsage3 } from '../sample/simple-usage-3';
describe('simple-usage-3.spec.ts', () => {
const classMirror = ClassMirror.reflect(SimpleUsage3);
it('should match members l... |
quicker-js/class-decorator | src/mirrors/declaration-mirror/index.ts | <reponame>quicker-js/class-decorator
import { DeclarationMetadata } from '../../metadatas';
import { ClassConstructor } from '../../interfaces';
/**
* @class DeclarationMirror
*/
export abstract class DeclarationMirror<T extends DeclarationMetadata = any> {
/**
* metadata collection
* 元数据集合
*/
public re... |
quicker-js/class-decorator | src/decorators/request/metadata.ts | import { MethodMetadata } from '../../metadatas';
/**
* 元数据
*/
export class Metadata<T = MetadataOption> extends MethodMetadata<T> {}
export interface MetadataOption {
readonly path?: string;
readonly method?: string;
}
|
quicker-js/class-decorator | src/metadatas/parameter-metadata/index.ts | <reponame>quicker-js/class-decorator
import { DeclarationMetadata } from '../declaration-metadata';
import { ClassMirror, MethodMirror } from '../../mirrors';
/**
* @class ParameterMetadata
*/
export class ParameterMetadata<T = any> extends DeclarationMetadata<T> {
/**
* classMirror
* 元数据所属的 ClassMirror
*... |
quicker-js/class-decorator | src/metadatas/property-metadata/index.ts | <gh_stars>0
import { DeclarationMetadata } from '../declaration-metadata';
import { ClassMirror } from '../../mirrors';
/**
* @class PropertyMetadata
*/
export class PropertyMetadata<T = any> extends DeclarationMetadata<T> {
/**
* classMirror
* 元数据所属的 ClassMirror
*/
public classMirror: ClassMirror;
/... |
quicker-js/class-decorator | src/metadatas/class-metadata/index.ts | import { DeclarationMetadata } from '../declaration-metadata';
import { ClassMirror } from '../../mirrors';
/**
* class元数据
* @class ClassMetadata
*/
export abstract class ClassMetadata<T = any> extends DeclarationMetadata<T> {
/**
* classMirror
* 元数据所属的ClassMirror
*/
public classMirror: ClassMirror;
}
|
quicker-js/class-decorator | src/mirrors/method-mirror/index.ts | import { DeclarationMirror } from '../declaration-mirror';
import { ClassMirror } from '../class-mirror';
import { MethodMetadata, ParameterMetadata } from '../../metadatas';
import { ParameterMirror } from '../parameter-mirror';
import { ClassConstructor } from '../../interfaces';
/**
* @class MethodMirror
* 方法反射
... |
quicker-js/class-decorator | src/decorators/param/index.ts | <filename>src/decorators/param/index.ts
/**
* @hide
* 参数装饰器示例
*/
import { ParameterMirror } from '../../mirrors';
import { Metadata, MetadataOption } from './metadata';
/**
* 无参装饰器
* @param target
* @param propertyKey
* @param parameterIndex
*/
export function param(
target: Object,
propertyKey: string | s... |
quicker-js/class-decorator | src/metadatas/method-metadata/index.ts | <filename>src/metadatas/method-metadata/index.ts
import { DeclarationMetadata } from '../declaration-metadata';
import { ClassMirror } from '../../mirrors';
/**
* @class MethodMetadata
* 方法元数据
*/
export class MethodMetadata<T = any, D = any> extends DeclarationMetadata<T> {
/**
* classMirror
* 元数据所属的ClassMi... |
quicker-js/class-decorator | src/index.ts | <reponame>quicker-js/class-decorator
export * from './mirrors';
export * from './interfaces';
export * from './metadatas';
|
quicker-js/class-decorator | sample/simple-usage-2.ts | import { entity, param, property, request } from '../src/decorators';
import { SimpleGirl } from './simple-girl';
import { SimpleBoy } from './simple-boy';
import { SimpleUsage1 } from './simple-usage-1';
@entity({ title: 'SimpleUsage2' })
/**
* SimpleUsage1
*/
export class SimpleUsage2 extends SimpleUsage1 {
@pro... |
quicker-js/class-decorator | test/simple-boy.spec.ts | import 'reflect-metadata';
import { describe, it } from 'mocha';
import { expect } from 'chai';
import { ClassMirror } from '../src';
import { SimpleBoy } from '../sample/simple-boy';
describe('simple-boy.spec.ts', () => {
const classMirror = ClassMirror.reflect(SimpleBoy);
it('should match members length.', func... |
quicker-js/class-decorator | src/decorators/entity/metadata.ts | import { ClassMetadata } from '../../metadatas';
/**
* 元数据
*/
export class Metadata<T = MetadataOption> extends ClassMetadata<T> {}
export interface MetadataOption {
readonly title: string;
}
|
quicker-js/class-decorator | src/interfaces/index.ts | <reponame>quicker-js/class-decorator
export * from './class-constructor';
|
quicker-js/class-decorator | src/metadatas/declaration-metadata/index.ts | <filename>src/metadatas/declaration-metadata/index.ts
/**
* 声明元数据
*/
export abstract class DeclarationMetadata<T = any> {
/**
* target
* 元数据目标
*/
public target: Object;
/**
* constructor
* 构造函数
* @param metadata 元数据对象
*/
public constructor(public metadata: T) {}
}
|
quicker-js/class-decorator | src/decorators/index.ts | <reponame>quicker-js/class-decorator
/**
* decorators
*/
export * from './property';
export * from './entity';
export * from './param';
export * from './request';
|
quicker-js/class-decorator | test/simple-usage-2.spec.ts | <reponame>quicker-js/class-decorator<gh_stars>0
import 'reflect-metadata';
import { describe, it } from 'mocha';
import { expect } from 'chai';
import { ClassMirror, MethodMirror, PropertyMirror } from '../src';
import { SimpleUsage2 } from '../sample/simple-usage-2';
describe('simple-usage-2.spec.ts', () => {
const... |
quicker-js/class-decorator | src/mirrors/index.ts | <reponame>quicker-js/class-decorator<filename>src/mirrors/index.ts
export * from './class-mirror';
export * from './declaration-mirror';
export * from './method-mirror';
export * from './property-mirror';
export * from './parameter-mirror';
|
quicker-js/class-decorator | sample/simple-boy.ts | <reponame>quicker-js/class-decorator
import { entity, property } from '../src/decorators';
import { SimplePerson } from './simple-person';
@entity({ title: 'SimplePerson' })
/**
* SimpleUsage1
*/
export class SimpleBoy extends SimplePerson {
@property
public age: number;
}
|
quicker-js/class-decorator | src/decorators/property/metadata.ts | <gh_stars>0
import { PropertyMetadata } from '../../metadatas';
/**
* Metadata
*/
export class Metadata<T = MetadataOption> extends PropertyMetadata<T> {}
export interface MetadataOption {
readonly title?: string;
}
|
pvince/exegesis | test/integration/integrationTest.ts | <reponame>pvince/exegesis
import { expect } from 'chai';
import * as http from 'http';
import * as path from 'path';
import { makeFetch } from 'supertest-fetch';
import * as exegesis from '../../src';
async function sessionAuthenticator(
context: exegesis.ExegesisPluginContext
): Promise<exegesis.AuthenticationRes... |
pvince/exegesis | test/integration/controllers/malformed.ts | <gh_stars>1-10
import { ExegesisContext } from "../../../src";
export function getBadResponse(_context: ExegesisContext) {
return {wat: 7};
} |
pvince/exegesis | src/options.ts | import ld from 'lodash';
import { MimeTypeRegistry } from "./utils/mime";
import TextBodyParser from './bodyParsers/TextBodyParser';
import JsonBodyParser from './bodyParsers/JsonBodyParser';
import BodyParserWrapper from './bodyParsers/BodyParserWrapper';
import { loadControllersSync } from './controllers/loadControl... |
kouMatsumoto/gulp-seed | gulp/task_helpers.ts | import * as child_process from 'child_process';
const resolveBin = require('resolve-bin');
/** Options that can be passed to execTask or execNodeTask. */
interface ExecTaskOptions {
// Whether to output to STDERR and STDOUT.
silent?: boolean;
// If an error happens, this will replace the standard error.
errMe... |
kouMatsumoto/gulp-seed | src/test.ts | class Test {
constructor() {
console.log('hello world');
}
}
export const test = new Test();
|
kouMatsumoto/gulp-seed | gulp/tasks/default.ts | <gh_stars>0
import * as gulp from 'gulp';
gulp.task('default', ['help']);
gulp.task('help', () => {
const taskList = Object.keys(gulp['tasks'])
.sort();
console.log(`\nHere's a list of supported tasks:\n `, taskList.join('\n '));
}); |
kouMatsumoto/gulp-seed | gulp/constants.ts | import {join} from 'path';
export const PROJECT_ROOT = join(__dirname, '..');
export const SOURCE_ROOT = join(PROJECT_ROOT, 'src');
export const DIST_ROOT = join(PROJECT_ROOT, 'dist'); |
kouMatsumoto/gulp-seed | gulp/tasks/lint.ts | import gulp = require('gulp');
import {execNodeTask} from '../task_helpers';
gulp.task('tslint', execNodeTask('tslint', ['-c', 'tslint.json', 'src/**/*.ts']));
gulp.task('stylelint', execNodeTask('stylelint', ['src/**/*.scss', '--config', '.stylelintrc.json', '--syntax', 'scss'])); |
kouMatsumoto/gulp-seed | gulpfile.ts | <gh_stars>0
/**
* Install gulp in global and just run gulp with tasks.
* Need not to transpile ts, automatically gulp will resolve ts using ts-node
*
* This gulpfile is simply loads the tasks inside ./gulp/tasks
*/
import * as path from 'path';
// Register TS compilation using tsconfig.json.
require('ts-node').re... |
azakordonets/ts-retry | src/retry/utils/untilTruthy/retry.ts | import { retry, retryAsync } from "../..";
import { UNTIL } from "../../options";
import {
retryUntilOptionsToRetryOptionsHof,
RetryUtilsOptions,
} from "../options";
const until = <RETURN_TYPE>(lastResult: RETURN_TYPE): boolean =>
// deno-lint-ignore no-explicit-any
(lastResult as any) == true;
const getOpti... |
azakordonets/ts-retry | src/misc.ts | export const asyncDecorator = <T>(fn: () => T) =>
() =>
new Promise<T>((resolve, reject) => {
try {
resolve(fn());
} catch (err) {
reject(err);
}
});
export const assertDefined = <T>(
value: T | undefined | null,
errMsg: string,
): value is T => {
if (value === undefin... |
azakordonets/ts-retry | src/retry/utils/untilResponse/index.ts | import { type } from "os";
export { retryAsyncUntilResponse } from "./retry";
export { retryAsyncUntilResponseDecorator } from "./decorators";
|
azakordonets/ts-retry | src/retry/utils/index.ts | <gh_stars>10-100
export { RetryUtilsOptions } from "./options";
export {
retryAsyncUntilDefined,
retryAsyncUntilDefinedDecorator,
retryUntilDefined,
retryUntilDefinedDecorator,
} from "./untilDefined";
export {
retryAsyncUntilTruthy,
retryAsyncUntilTruthyDecorator,
retryUntilTruthy,
retryUntilTruthyDe... |
azakordonets/ts-retry | lib/esm/retry/utils/untilResponse/retry.d.ts | import { RetryUtilsOptions } from "../options";
import { RESPONSE_TYPE } from "./type";
export declare function retryAsyncUntilResponse<RETURN_TYPE extends RESPONSE_TYPE>(fn: () => Promise<RETURN_TYPE>, retryOptions?: RetryUtilsOptions): Promise<RETURN_TYPE>;
|
azakordonets/ts-retry | lib/esm/wait/wait.d.ts | export declare function wait(duration?: number): Promise<unknown>;
export declare function waitUntil<RETURN_TYPE>(fn: () => RETURN_TYPE, duration?: number, error?: Error): Promise<RETURN_TYPE>;
export declare function waitUntilAsync<RETURN_TYPE>(fn: () => Promise<RETURN_TYPE>, duration?: number, error?: Error): Promise... |
azakordonets/ts-retry | src/retry/decorators.ts | import { retry, retryAsync, RetryOptions } from ".";
export function retryAsyncDecorator<
RETURN_TYPE extends (...args: any[]) => Promise<any>,
>(
fn: RETURN_TYPE,
retryOptions?: RetryOptions<ReturnType<RETURN_TYPE>>,
) {
return (...args: Parameters<RETURN_TYPE>): ReturnType<RETURN_TYPE> => {
const wrapped... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.