Skip to content

Instantly share code, notes, and snippets.

View MarlonPassos-git's full-sized avatar
🌴
On vacation

Marlon Passos MarlonPassos-git

🌴
On vacation
View GitHub Profile
@MarlonPassos-git
MarlonPassos-git / debounce.js
Created October 21, 2022 01:32
debounce with cancel and return
const debounce = (
{ delay },
func
) => {
let timer= null
let c = true
function debounced (...args) {
if (c) {
clearTimeout(timer)
timer = setTimeout(() =>{
@MarlonPassos-git
MarlonPassos-git / global.d.ts
Created October 7, 2022 01:19
types checkout m3
import { OrderForm } from "./orderForm"
import { ShippingSimutation } from "./shipping-simulation"
import { Store } from "./store"
declare global {
const vtexjs: {
checkout: {
orderForm: OrderForm,
orderFormId: string,
sendAttachment: (attachmentId: string, attachment: any, expectedOrderFormSections?: string[]) => Promise<OrderForm>
@MarlonPassos-git
MarlonPassos-git / style.json
Created September 20, 2022 16:33
vtex styles
{
"typeScale": [
3,
2.25,
1.5,
1.25,
1,
0.875,
0.75
],