type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
TypeAliasDeclaration
declare type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ArrowFunctionExpression | BigIntLiteral | DecimalLiteral;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | Decl...
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type TSEntityName = Identifier | TSQualifiedName;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral | DecimalLiteral;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | BigIntLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | DecimalLiteral;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type Method = ObjectMethod | ClassMethod | ClassPrivateMethod;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type ObjectMember = ObjectMethod | ObjectProperty;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type Property = ObjectProperty | ClassProperty | ClassAccessorProperty | ClassPrivateProperty;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type UnaryLike = UnaryExpression | SpreadElement;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type Class = ClassExpression | ClassDeclaration;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportNamespaceSpecifier | ExportDefaultSpecifier;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type Accessor = ClassAccessorProperty;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareE...
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation |...
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type FlowPredicate = DeclaredPredicate | InferredPredicate;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type EnumBody = EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type EnumMember = EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type Miscellaneous = Noop | Placeholder | V8IntrinsicIdentifier;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type TypeScript = TSParameterProperty | TSDeclareFunction | TSDeclareMethod | TSQualifiedName | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature | TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | T...
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type TSType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReferen...
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type TSBaseType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSLiteralType;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type DeprecatedAliases = NumberLiteral$1 | RegexLiteral$1 | RestProperty$1 | SpreadProperty$1;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type ReturnedChild = JSXSpreadChild | JSXElement | JSXFragment | Expression;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
//# sourceMappingURL=toKeyAlias.d.ts.map declare type Scope = { push(value: { id: LVal; kind: "var"; init?: Expression; }): void; buildUndefinedNode(): Node; };
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
//# sourceMappingURL=getOuterBindingIdentifiers.d.ts.map declare type TraversalAncestors = Array<{ node: Node; key: string; index?: number; }>;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type TraversalHandler<T> = (this: undefined, node: Node, parent: TraversalAncestors, state: T) => void;
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
TypeAliasDeclaration
declare type TraversalHandlers<T> = { enter?: TraversalHandler<T>; exit?: TraversalHandler<T>; };
0xBronko/theShop
node_modules/@babel/types/lib/index.d.ts
TypeScript
FunctionDeclaration
/* Copyright 2018 Renzhi Li (aka. Belleve Invis) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writi...
be5invis/primitive-quadify-off-curves
src/estimate.ts
TypeScript
FunctionDeclaration
function cubicRoot(x: number) { return x < 0 ? -Math.pow(-x, 1 / 3) : Math.pow(x, 1 / 3); }
be5invis/primitive-quadify-off-curves
src/estimate.ts
TypeScript
FunctionDeclaration
function cubicSolve(a: number, b: number, c: number, d: number) { // a*x^3 + b*x^2 + c*x + d = 0 if (a === 0) { return quadSolve(b, c, d); } // solve using Cardan's method, which is described in paper of R.W.D. Nickals // http://www.nickalls.org/dick/papers/maths/cubic1993.pdf (doi:10.2307/3619777) let xn = -b...
be5invis/primitive-quadify-off-curves
src/estimate.ts
TypeScript
FunctionDeclaration
function cubicSolveT(e3: number, e2: number, e1: number, e0: number) { const as = cubicSolve(e3, e2, e1, e0); const r = [0, 1]; for (const x of as) if (x > 0 && x < 1) r.push(x); return r; }
be5invis/primitive-quadify-off-curves
src/estimate.ts
TypeScript
FunctionDeclaration
function bez2(a: number, b: number, c: number, t: number) { return mix(mix(a, b, t), mix(b, c, t), t); }
be5invis/primitive-quadify-off-curves
src/estimate.ts
TypeScript
FunctionDeclaration
export function minDistanceToQuad( zx: number, zy: number, ax: number, ay: number, bx: number, by: number, cx: number, cy: number ): number { const aax = ax + cx - 2 * bx; const aay = ay + cy - 2 * by; const bbx = 2 * (bx - ax); const bby = 2 * (by - ay); const e3 = 2 * (aax * aax + aay * aay); const e2 ...
be5invis/primitive-quadify-off-curves
src/estimate.ts
TypeScript
ClassDeclaration
@NgModule({ declarations: [ ], imports: [ ], providers: [ DocumentRef, BigScreenService ], exports: [ ] }) export class BigScreenModule { }
alxhotel/angular-bigscreen
projects/angular-bigscreen/src/lib/bigscreen.module.ts
TypeScript
ArrowFunction
value => { loadTx.setText(`${Math.floor(value * 100)}%`); }
Aurory-Game/nefties-defenders
client/src/scenes/Preloader.ts
TypeScript
ArrowFunction
() => this.onLoadComplete()
Aurory-Game/nefties-defenders
client/src/scenes/Preloader.ts
TypeScript
ClassDeclaration
export default class Preloader extends Phaser.Scene { constructor() { super(PRELOADER_KEY); } create() { this.load.multiatlas('anims', 'assets/chars/multiatlas.json', 'assets/chars/'); const loadTx = this.add.text(this.scale.width / 2, this.scale.height / 2, '0%', { fo...
Aurory-Game/nefties-defenders
client/src/scenes/Preloader.ts
TypeScript
MethodDeclaration
create() { this.load.multiatlas('anims', 'assets/chars/multiatlas.json', 'assets/chars/'); const loadTx = this.add.text(this.scale.width / 2, this.scale.height / 2, '0%', { fontSize: '45px', }).setOrigin(0.5); this.load.animation('animsData', 'assets/chars/anims.json'); ...
Aurory-Game/nefties-defenders
client/src/scenes/Preloader.ts
TypeScript
MethodDeclaration
onLoadComplete() { this.scene.start(MENU_KEY); }
Aurory-Game/nefties-defenders
client/src/scenes/Preloader.ts
TypeScript
FunctionDeclaration
function randomString(len: number) { let text = ""; const charset = "abcdefghijklmnopqrstuvwxyz"; for (let charIndex = 0; charIndex < len; charIndex++) { text += charset.charAt(Math.floor(Math.random() * charset.length)); } return text; }
Glavin001/genetic-js
test/string.spec.ts
TypeScript
FunctionDeclaration
function replaceAt(str: string, index: number, character: string) { return ( str.substr(0, index) + character + str.substr(index + character.length) ); }
Glavin001/genetic-js
test/string.spec.ts
TypeScript
FunctionDeclaration
function solveTest( singleSelectionName: keyof typeof Genetic.Select1, pairWiseSelectionName: keyof typeof Genetic.Select2, config: Partial<Configuration> ) { const singleSelection: SingleSelection<Entity> = Genetic.Select1[singleSelectionName]; const pairWiseSelection: PairWiseSelection<Entity> = Ge...
Glavin001/genetic-js
test/string.spec.ts
TypeScript
ArrowFunction
done => { jest.setTimeout(10000); expect.assertions(1); const userData: UserData = { solution: "thisisthesolution", }; class CustomPhraseGenetic extends PhraseGenetic { public select1: SingleSelection<Entity> = singleSelection; public select2: PairWiseSelection<Entity> = pairWiseS...
Glavin001/genetic-js
test/string.spec.ts
TypeScript
ArrowFunction
() => { const config: Partial<Configuration> = { crossover: 0.4, iterations: 2000, mutation: 0.3, size: 20, }; const singleSelectionName = "Tournament3"; const pairWiseSelectionName = "Tournament3"; solveTest(singleSelectionName as any, pairWiseSelectionName as any, config); // Object.keys(...
Glavin001/genetic-js
test/string.spec.ts
TypeScript
ClassDeclaration
abstract class PhraseGenetic extends Genetic.Genetic<Entity, UserData> { public optimize: Optimize.OptimizeFun = Genetic.Optimize.Maximize; public seed() { function randomString(len: number) { let text = ""; const charset = "abcdefghijklmnopqrstuvwxyz"; for (let charIndex = 0; charIndex < len...
Glavin001/genetic-js
test/string.spec.ts
TypeScript
ClassDeclaration
class CustomPhraseGenetic extends PhraseGenetic { public select1: SingleSelection<Entity> = singleSelection; public select2: PairWiseSelection<Entity> = pairWiseSelection; public notification({ population: pop, generation, isFinished, }: { population: Population<...
Glavin001/genetic-js
test/string.spec.ts
TypeScript
TypeAliasDeclaration
type Entity = string;
Glavin001/genetic-js
test/string.spec.ts
TypeScript
TypeAliasDeclaration
type UserData = { solution: string; };
Glavin001/genetic-js
test/string.spec.ts
TypeScript
MethodDeclaration
public seed() { function randomString(len: number) { let text = ""; const charset = "abcdefghijklmnopqrstuvwxyz"; for (let charIndex = 0; charIndex < len; charIndex++) { text += charset.charAt(Math.floor(Math.random() * charset.length)); } return text; } // create ran...
Glavin001/genetic-js
test/string.spec.ts
TypeScript
MethodDeclaration
public mutate(entity: Entity) { function replaceAt(str: string, index: number, character: string) { return ( str.substr(0, index) + character + str.substr(index + character.length) ); } // chromosomal drift const replaceIndex = Math.floor(Math.random() * entity.length); return ...
Glavin001/genetic-js
test/string.spec.ts
TypeScript
MethodDeclaration
public crossover(mother: Entity, father: Entity): [Entity, Entity] { // two-point crossover const len = mother.length; let ca = Math.floor(Math.random() * len); let cb = Math.floor(Math.random() * len); if (ca > cb) { const tmp = cb; cb = ca; ca = tmp; } const son = ...
Glavin001/genetic-js
test/string.spec.ts
TypeScript
MethodDeclaration
public fitness(entity: Entity) { let fitness = 0; for (let entityIndex = 0; entityIndex < entity.length; ++entityIndex) { // increase fitness for each character that matches if (entity[entityIndex] === this.userData.solution[entityIndex]) { fitness += 1; } // award fractions of...
Glavin001/genetic-js
test/string.spec.ts
TypeScript
MethodDeclaration
public shouldContinue({ population: pop, generation, stats, }: GeneticState<Entity>): boolean { // stop running once we've reached the solution return pop[0].entity !== this.userData.solution; }
Glavin001/genetic-js
test/string.spec.ts
TypeScript
MethodDeclaration
public notification({ population: pop, generation, isFinished, }: { population: Population<Entity>; generation: number; stats: Stats; isFinished: boolean; }) { if (isFinished) { expect(pop[0].entity).toBe(this.userData.solution); ...
Glavin001/genetic-js
test/string.spec.ts
TypeScript
ArrowFunction
( environment: Environment, input: DisableSecondFactorInput ) => { return new Promise<DisableSecondFactorMutationResponse>( async (resolve, reject) => { commitMutation<DisableSecondFactorMutation>(environment, { onCompleted: data => { const response = data.disableSecondFactor.secondFa...
damassi/force-test
src/v2/Components/UserSettings/TwoFactorAuthentication/Components/Mutation/DisableSecondFactor.ts
TypeScript
ArrowFunction
async (resolve, reject) => { commitMutation<DisableSecondFactorMutation>(environment, { onCompleted: data => { const response = data.disableSecondFactor.secondFactorOrErrors switch (response.__typename) { case "AppSecondFactor": resolve(data) b...
damassi/force-test
src/v2/Components/UserSettings/TwoFactorAuthentication/Components/Mutation/DisableSecondFactor.ts
TypeScript
ArrowFunction
data => { const response = data.disableSecondFactor.secondFactorOrErrors switch (response.__typename) { case "AppSecondFactor": resolve(data) break case "SmsSecondFactor": resolve(data) break case "Errors":...
damassi/force-test
src/v2/Components/UserSettings/TwoFactorAuthentication/Components/Mutation/DisableSecondFactor.ts
TypeScript
ArrowFunction
error => { reject(error) }
damassi/force-test
src/v2/Components/UserSettings/TwoFactorAuthentication/Components/Mutation/DisableSecondFactor.ts
TypeScript
ArrowFunction
props => props.menuBoundingBox.height
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
ArrowFunction
props => props.menuBoundingBox.width
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
ArrowFunction
props => props.menuFixed && css` position: fixed; width: ${props.menuBoundingBox.width}px; top: ${props.menuFixedTopOffset}; `
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
ArrowFunction
p => p.active ? 'rgba(53, 50, 50, 0.05)' : 'transparent'
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
ArrowFunction
p => p.active ? 'var(--tina-color-primary)' : 'var(--tina-color-grey-8)'
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
ArrowFunction
props => props.active && css` color: var(--tina-color-primary); fill: var(--tina-color-primary); background-color: rgba(53, 50, 50, 0.05); `
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
ArrowFunction
props => props.disabled && css` pointer-events: none; color: #d1d1d1; fill: #d1d1d1; `
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
ArrowFunction
({ children, open, triggerRef, ...styleProps }) => { const MenuPortal = useMenuPortal() const menuPortalRef = React.useRef<HTMLDivElement | null>(null) const menuOffset = useMemo(() => { if (!triggerRef.current || !menuPortalRef.current) return 0 const menuDropdownBoundingBox = triggerRef.curr...
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
ArrowFunction
() => { if (!triggerRef.current || !menuPortalRef.current) return 0 const menuDropdownBoundingBox = triggerRef.current.getBoundingClientRect() const menuPortalBoundingBox = menuPortalRef.current.getBoundingClientRect() return menuDropdownBoundingBox.x - menuPortalBoundingBox.x }
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
ArrowFunction
props => props.open && css` opacity: 1; pointer-events: all; transform: translate3d(0, 100%, 0) scale3d(1, 1, 1); `
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
ArrowFunction
props => props.offset
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
TypeAliasDeclaration
type MenuPlaceholderProps = { menuBoundingBox: any }
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
TypeAliasDeclaration
type MenuWrapperProps = { menuFixed: boolean menuBoundingBox: any menuFixedTopOffset: string }
blaggacao/tinacms
packages/react-tinacms-editor/src/state/plugins/Menu/MenuComponents.tsx
TypeScript
ArrowFunction
() => { const color = new Color.Color([0.5, 0.5, 0.5, 0.5], 'testFormat', 'testColor'); assert.deepEqual(color.rgba(), [0.5, 0.5, 0.5, 0.5], 'RGBA array was not set correctly'); assert.strictEqual(color.asString(), 'testColor', 'original text was not set correctly'); assert.strictEqual(color.format(), ...
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const color = new Color.Color([-0.5, 0.5, 0.5, 0.5], 'testFormat', 'testColor'); assert.deepEqual(color.rgba(), [0, 0.5, 0.5, 0.5], 'RGBA array was not set correctly'); assert.strictEqual(color.asString(), 'testColor', 'original text was not set correctly'); assert.strictEqual(color.format(), '...
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const color = new Color.Color([1.1, 0.5, 0.5, 0.5], 'testFormat', 'testColor'); assert.deepEqual(color.rgba(), [1, 0.5, 0.5, 0.5], 'RGBA array was not set correctly'); assert.strictEqual(color.asString(), 'testColor', 'original text was not set correctly'); assert.strictEqual(color.format(), 't...
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const color = Color.Color.fromHSVA([0.5, 0.5, 0.5, 100]); assert.deepEqual(color.rgba(), [0.25, 0.49999999999999994, 0.5, 1], 'RGBA array was not set correctly'); assert.strictEqual(color.asString(), 'hsl(180 33% 38% / 1)', 'original text was not set correctly'); assert.strictEqual(color.format...
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const color = new Color.Color([0.5, 0.5, 0.5, 0.5], 'testFormat', 'testColor'); const hsva = color.hsva(); assert.deepEqual(hsva, [0, 0, 0.5, 0.5], 'HSVA was not calculated correctly'); }
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const lum = Color.Color.luminance([0.5, 0.5, 0.5, 0.5]); assert.strictEqual(lum, 0.21404114048223255, 'luminance was not calculated correctly'); }
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const lum = Color.Color.luminance([0.03927, 0.03927, 0.03927, 0.5]); assert.strictEqual(lum, 0.003039473684210526, 'luminance was not calculated correctly'); }
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const result = Color.Color.desiredLuminance(0.2, 2, true); assert.strictEqual(result, 0.45, 'luminance was not calculated correctly'); }
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const result = Color.Color.desiredLuminance(0.2, 2, false); assert.strictEqual(result, 0.075, 'luminance was not calculated correctly'); }
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const result = Color.Color.desiredLuminance(0.2, 5, true); assert.strictEqual(result, 0, 'luminance was not calculated correctly'); }
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const color = new Color.Color([0.5, 0.5, 0.5, 0.5], 'testFormat', 'testColor'); const result = color.canonicalHSLA(); assert.deepEqual(result, [0, 0, 50, 0.5], 'canonical HSLA was not calculated correctly'); }
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const firstColor = [1, 0, 0, 1]; const secondColor = [0, 0, 1, 1]; const contrastRatio = Color.Color.calculateContrastRatio(firstColor, secondColor); assert.strictEqual(contrastRatio, 2.148936170212766, 'contrast ratio was not calculated correctly'); }
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const firstColor = [1, 0, 0, 1]; const secondColor = [0, 0, 1, 1]; const result: number[] = []; Color.Color.blendColors(firstColor, secondColor, result); assert.deepEqual(result, [1, 0, 0, 1], 'colors were not blended successfully'); }
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { assert.deepEqual(Color.Color.parse('#FF00FF')!.rgba(), [1, 0, 1, 1]); assert.deepEqual(Color.Color.parse('#F0F')!.rgba(), [1, 0, 1, 1]); assert.deepEqual(Color.Color.parse('#F0F0')!.rgba(), [1, 0, 1, 0]); assert.deepEqual(Color.Color.parse('#FF00FF00')!.rgba(), [1, 0, 1, 0]); }
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { assert.deepEqual(Color.Color.parse('red')!.rgba(), [1, 0, 0, 1]); }
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const colorOne = Color.Color.parse('rgb(255, 255, 0)')!; assert.deepEqual(colorOne.rgba(), [1, 1, 0, 1]); const colorTwo = Color.Color.parse('rgba(0, 255, 255, 0.5)')!; assert.deepEqual(colorTwo.rgba(), [0, 1, 1, 0.5]); const colorThree = Color.Color.parse('rgb(255 255 255)')!; assert...
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { const colorOne = Color.Color.parse('hsl(0, 100%, 50%)')!; assert.deepEqual(colorOne.rgba(), [1, 0, 0, 1]); const colorTwo = Color.Color.parse('hsla(0, 100%, 50%, 0.5)')!; assert.deepEqual(colorTwo.rgba(), [1, 0, 0, 0.5]); const colorThree = Color.Color.parse('hsla(50deg 100% 100% / 50%)')...
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript
ArrowFunction
() => { assert.isNull(Color.Color.parse('#FAFAFA Trailing')); assert.isNull(Color.Color.parse('#FAFAFG')); assert.isNull(Color.Color.parse('gooseberry')); assert.isNull(Color.Color.parse('rgb(10% 10% 10% /)')); assert.isNull(Color.Color.parse('rgb(10% 10% 10% 0.4 40)')); assert.isNull(Col...
song940/devtools-frontend
test/unittests/front_end/common/Color_test.ts
TypeScript