reonZ

u/reonZ



r/css•

I have an element that uses the columns property, but its overflow is different between both browsers.

On chrome, the element never has more columns that the set value and creates a vertical overflow.

On firefox, more columns are added to fit everything but the element width will be set to only show the x columns, creating an horizontal overflow instead.

I would like the behavior on firefox to be the same as the one on chrome, is there a way to force firefox to only have x columns and instead make their height increase ?

10

r/css•
<div class="panel">
  <header></header>
  <div class="list">
    <div class="item">
      <div class="image">
        <img>
      </div>
    </div>
  </div>
  <footer></footer>
</div>

I have this HTML structure

.panel {
  position: absolute;
}
.list {
  overflow: hidden auto;
  display: flex;
  flex-direction: column;
}
.item {
  display: flex;
  height: var(--some-height);
}
.item .image {
  position: relative;
  height: calc(100% - 0.1em);
  aspect-ratio: 1 / 1;
}
.item .image img {
  position: absolute;
  border: none;
  pointer-events: none;
  transform: scale(var(--scaleX), var(--scaleY));
}

What this does is let the img sometimes be bigger than its container

16

r/typescript•

I would like to infer the return type of

interface MyInterface {
  prepare?: (...args: any[]) => Record<string, unknown> | Promise<Record<string, unknown>>;
  process: (options: {custom: ReturnType<this["prepare"]>}) => void | Promise<void>;
}

const test: MyInterface  = {
  prepare: () => {
    return { test: "something" }
  },
  process: ({ custom }) => {
    // want to be able to do `custom.test`
  }
}

No matter how i approach it, using generics and whatnot, custom always ends up being `Record<string, unknown>`, i would like to infer the exact returned type from prepare

17

r/typescript•

I have the recursive part done i think:

type Updatable<O> = O extends object
    ? {
          [K in keyof O]?: Updatable<O[K] | true>;
      }
    : O;

This properly allows me to not provide a key if not needed and if needed, i can give it a value of `true`

Now onto the second problem, i need the keys of the `Updatable` to be `"myKey"` or `"-=myKey"`, but i can't figure out how to make this.

Also, the ideal would be to actually have `["myKey"]?: Updatable<O[K]>` and `["-=myKey"]: true`

15


r/SandsOfAura•

So when i started, i chose dual wielding and focused heavily on haste, after a while i realized that there was a cap of 50% in haste in the character sheet.

My question is, does the dual wielding 25% bonus goes over that cap or not ? Because i invested everything i had in that weapon and i can't switch the style anymore.

10

r/typescript•

I have access to a big typescript project source code that is running client side in a browser, the team working on it doesn't like to expose too much (they do to some extent) of their functionalities in the global.

What i would like to do, is expose more of it to the global but i am not sure how to setup my own project so i can import stuff from the other project and bundle it (with dependencies).

Basically, i would like to do:

import { someFunction, SomeClass } from '../path/to/other/project';

window.whatever = {
  someFunction,
  SomeClass 
}
14


r/pathofexile•

I have not played the game for a few leagues now, so i am definitely not up to date. I just started playing the league few days ago, was playing the Zizaran/Ghazzy necromancer build and had fun with it.

I just looted and sold a headhunter and was contemplating how to push the build further but wasn't really convinced.

So i am looking for some recommendation, i am playing on SC, like builds that can stand their ground and tank, i don't focus much on any league mechanics (i play wandering path).

Melee or ranged doesn't matter as long as the clearing doesn't get tedious and bosses go down fast.

15

r/typescript•

I have combos of types and would like to know if i could in any way link them together instead of always calling them both,

// CATEGORIES is a const array type Category = typeof import('./categories').CATEGORIES[number]
type BaseCategory<T extends string> = Extract<Category, { type: T }>
type TrainedSkill = BaseCategory<'trainedSkill'> type AddedLanguage = BaseCategory<'addedLanguage'> type ScrollChain = BaseCategory<'scrollChain'> // this keeps going on, there are more types

So all those types are extracted from the array, then i define data types

type TrainedSkillData = {...}
type AddedLanguageData = {...}
type ScrollChainData = {...
512

r/typescript•

Let's say i have this array:

const arr = [
  {type: 'one', name: 'something', ids: []},
  {type: 'one', name: 'something else', ids: []},
  {type: 'two', name: 'something different', id: ''},
  {type: 'two', name: 'very different', id: ''},
] as const

There will be more but that's the gist of it, what i would like to know is if there is a way to extract the different types from it.

i already have the easy part with:

type CategoryType = typeof arr[number]['type'] // 'one' | 'two'

Is it possible to get the categories all together, the result would need to look as if i did the following myself:

interface Category {
  type: CategoryType
  name: string
}

interface Cat
52

r/underrail•

Gas the drones stuck

Discussion/Question

So i went in, killed everything, found the Free Drones Hideout keycard and went to the room in the south part, there i click on the Electronic Lock and it says "unlocked" but the door won't open, i keep getting the message "this door does not have a conventional lock".

Now i am stuck i can't go back in the previous room without turning into a mutant.

211

r/underrail•

So i ran in the ladder to GMS 3, cleared the floor and now i can't leave because i don't have mechanics to repair the elevator and going back up the ladder throws me into an unwinnable situation where 2 robots are waiting for me and always get to play first.

I really don't want to start over and don't have any save before that..

010