D
Deno

help

What are newUserProps()

Aataractic8/2/2023
I'm reading saaskit source, and I don't understand the point of newUserProps(). Why not just define isSubscribed in the createUser() function with all the other values as it is in the interface as well? We could just set it to false by default?
Aataractic8/2/2023
Aataractic8/2/2023
If I want to add properties to my user, should i add them to newUserProps() or directly into createUser() ?
IioB8/2/2023
@iuioiua
Iiuioiua8/3/2023
Hi there. Previously, the method you suggested was used. However, we moved the logic that generates the objects outside their respective createX() functions as it significantly improved usability. See https://github.com/denoland/saaskit/pull/292, https://github.com/denoland/saaskit/pull/290 and https://github.com/denoland/saaskit/pull/284 for more context.
GitHub
refactor: items logic in KV by iuioiua · Pull Request #284 · denola...
Before, functions within util/db.ts did too much. E.g. createItem() generated an item, set it in KV, and then returned the generated item. Now, functions only do one thing, making things easier to ...
Aataractic8/3/2023
thank you for linking these PRs. So if I want to add my own members i should add them to newUserProps() as long as I don't need to get the object from the key value
Iiuioiua8/3/2023
Sorry, I don’t understand
Aataractic8/3/2023
anyways that's not really important, what I wanted is working now
Iiuioiua8/3/2023
Nice! Let me know if you have any other questions with SaaSKit 🙂

Looking for more? Join the community!

Recommended Posts
Run a detached child process in DenoI'm looking at running a detached child process using Deno. Specifically I want run something like adeno info returns module not found``` deno info https://raw.githubusercontent.com/Murcul/norm/v1.3.0/src/mod.ts error: module could nocan't scrub video```<div className={"flex flex-col text-primary w-full lg:w-1/2 justify-center"}> <video classNamProper usage of `Deno.HttpClient`Hi! I'm creating an application which allows the internal use of HTTP proxies for certain tasks. In What's a good way to write tests for a script which does a bunch filesystem wrangling?As per the title - I have a script which, given a folder, does a bunch of moving and renaming. I'd lHow to access request body in Deno?Thank you.Syntax error when getting prop children Element but compilesIs this error important? How can I fix it? Should I fix it?Generate jUnit XML file from Deno TestsHey is it possible that the Deno Test suite generates a jUnit XML about the Test? So that I can dispHow to do callbacks with `deno_core`?Hello! I've been inspired to write an application after reading this article: https://deno.com/blog/How to ignore ts error when bundling?I run ``` deno bundle '.main.ts' fibery.js ``` and it refuses to work due to 41 errors. Mostly theyStreaming FormDataI have `Deno.serve` a HTML page with `<form enctype="multipart/form-data">` with a `file` input. IAstro - Vs code templateI am deploying this app using the deno deploy. My app's root is available at https://antilibrary-asdenodrivers/sqlite and deno-sqlit behave different with multiple `?` argsI wanted to understand why these return different results ```ts Deno.test("DB()", (_) => { // Want to write a small NPM package that's for all contextsdeno, browser and node is this April 2022 resource the best one for this? https://portal.gitnation.oSite runs fine but vscode is filled with errors.Kinda annoying, any ideas why?Is there a way to disable Deno Deploy server timing out in ~5 1/2 minutes?Is there a way to disable Deno Deploy server timing out in ~5 1/2 minutes?Object to tuple of tuple of keys and type?Example: ```ts type SomeType = { owo: string uwu: number } ``` Into ```ts type SomeType = [ ["typescript compiler (38.24MB) included in bundle when importing google's npm:schema-dtsNot sure if this is a bug, but I couldn't see how the package imports the compiler. create a ts fil