FullstackViking

u/FullstackViking


r/typescript•

I've been working in a project that has a lot of construction by composition. Read: parameterless constructors, and post-constructor initialization by factory methods. However, as the shapes of the components change, some required inputs can be missed and are only discovered in runtime logging.

We started looking at the idea of some Input<T> utility typing, and a related Pick<T> type extension that allows the required properties of a class to be extracted.

Part of me likes this, but part of me thinks it's a little smelly too. Looking for feedback:

[TypeScript Playground Link](https://www.typescriptlang.org/play/?ssl=37&ssc=43&pln=1&pc=1#code/CYUwxgNghgTiAEYD2A7AzgF3gSRQBwFcMAhGKFYALngJ

410

r/buildapc•

My goal is to use my PC for work and gaming.

My company requires the use of fairly invasive software for remote connections. So much so that some games will not even launch because it hijacks certain processes. This software only works on Windows as well.

Conversely, some of the games I play use invasive anti-cheat software that I'd like to keep isolated from anything related to my work. The games I play are also only on windows, and have no compatibility with Linux according to ProtonDB.

I did successfully install windows on 2 different drives, but understandably the drives and all their contents are still visible to one another. I attempted to enable bitlocker but that soft-bricked my c

19

r/buildapc•

Moreso just wanted to post this hear for potentially anybody else that has or runs into this issue in the future.

The motherboard purchased last week shipped with 13.02 (2023/4/17).

First I attempted to install 17.03 via the UEFI and selecting the file manually through the Instant Flash user interface. Next I attempted to flash it following the steps for ASRock's Flashback functionality. Both attempts signaled a completed update, but would not post. Only displaying a black screen and the CPU fan ramping up and down repeatedly.

To troubleshoot, I managed to install 14.03, 15.05, and 16.01. All worked as expected besides 17.03 (latest).

The motherboard is working as expected on 16.01 now

11

r/sffpc•

Looking to downsize my Unraid server from an ATX Tower. The Node 304 checks the boxes that I'd like to maintain: my full-size ATX PSU, full-size air cooler, fit full-size GPU, and accommodate 4+ HDDs. But the Node 304 hasn't been updated in a decade.

Are there any other more modern options out there?

14

r/espresso•

Right now I make milk drinks at home with an Aeropress/moka pot and a Brevelle stovetop steamer for frothing. We have a toddler that needs to get out the door in the morning, and my current coffee routine makes me too unavailable.

I already have a Eureka Mignon Silenzio grinder. I enjoy good coffee but I'm definitely not picky (my current routine *tastes* fine to me).

I am obviously drawn to super-automatics (Miele CM 5310) but longevity and cleanliness is a concern for me. I like the Rancilio Silvia Pro X, but am concerned that it will still demand too much of my attention in the mornings.

Looking for feedback, thanks!

13

r/buildapc•

Ryzen 7 5700G

MSI B550 Gaming Plus

Samsung 980 Pro

​

Setup and fresh windows install went just fine. Samsung Magician is showing that the drive is operating in Gen 3x4, and the benchmark speeds support that as well (3500 MB/s read/write). Drive was purchased new from Best Buy, reports as genuine in Samsung Magician.I've updated to the latest BIOS, latest drivers, latest firmware.

12


r/javascript•

I am looking to implement a console in an application I'm building. Similar to Chromium dev-tool console. It will be used in conjunction with the Monaco editor library for users to run code/plugins in a sandbox.

Before I reinvent the wheel I'm looking for suggestions on a library that might already accomplish that. So far I've only found the jsFiddle console code: link

Thank you in advance!

32

r/typescript•

I am looking to implement a console in an application I'm building. Similar to Chromium dev-tool console. It will be used in conjunction with the Monaco editor library for users to run code/plugins in a sandbox.

Before I reinvent the wheel I'm looking for suggestions on a library that might already accomplish that. So far I've only found the jsFiddle console code: link

Thank you in advance!

21

r/typescript•

Might be too early in the morning without my coffee, but I feel like I'm misremembering some syntax...

Here is a minimal example of what I might want to do.

interface IFoo {
    foo: string;
}

interface IBar {
    bar: string;
}

function Merge<T extends object, U extends object>(target: U, source: T): T & U {
    return Object.assign(target, source);
}


const bar: IBar = {
    bar: 'test-bar'
};

const foobar = Merge<IFoo>(bar, { foo: 'test-foo' }); // Expected 2 type arguments, but got 1.(2558)

Is there any way to accomplish the following and have bar be inferred without having to explicitly provide it?

[Playground Link](https://www.typescriptlang

24