Stage: 0 – Strawperson (draft for discussion)
Champions: Seeking champions
Authors: Your Name Here (@handle)
Repo: to be created
| /*! For license information please see brave_new_tab_page.bundle.js.LICENSE.txt */ | |
| import*as e from"chrome://resources/js/plural_string_proxy.js";import{PageCallbackRouter as t,PageHandler as n}from"chrome://resources/mojo/components/omnibox/browser/searchbox.mojom-webui.js";var r,o,a,l,i={"./brave/browser/ui/webui/brave_new_tab_page_refresh/brave_new_tab_page.mojom.m.js"(e,t,n){n.d(t,{HvG:()=>h,TDS:()=>f,_DX:()=>c,gC3:()=>d,yWW:()=>i});var r=n("./mojo/public/js/bindings.js"),o=n("./brave/components/brave_ads/core/mojom/brave_ads.mojom.m.js"),a=n("./brave/components/brave_vpn/common/mojom/brave_vpn.mojom.m.js");const l={$:r.K.internal.Enum()},i={kBrave:0,kCustom:1,kSolid:2,kGradient:3,MIN_VALUE:0,MAX_VALUE:3},s={$:r.K.internal.Enum()},c={kCustom:0,kMostVisited:1,MIN_VALUE:0,MAX_VALUE:1},u={$:r.K.internal.Enum()},d={kAuto:0,k12:1,k24:2,MIN_VALUE:0,MAX_VALUE:2};class p{constructor(e){this.handle=r.K.internal.interfaceSupport.getEndpointForReceiver(e)}bindInBrowser(e="context"){r.K.internal.interfaceSupport.bind |
| settings is fn { | |
| foo, bar, ex from args; | |
| count is var num 0; | |
| // if on same line no curly braces needed just like in JavaScript. | |
| Title is str <h1>Hello World!</h1>; | |
| person is struct { | |
| name is str "Ivan"; |
| const fs = require("fs"); | |
| const path = require("path"); | |
| const directory = path.join(__dirname, "public", "images"); | |
| fs.readdir(directory, (error, files) => { | |
| if (error) throw new Error("Could not read directory"); | |
| files.forEach((file) => { | |
| const file_path = path.join(directory, file); |
| export function html(literals: { raw: any }, ...vars: any[]) { | |
| let raw = literals.raw, | |
| HTMLprecompiled = "", | |
| i = 1, | |
| len = arguments.length, | |
| str, | |
| variable; | |
| while (i < len) { | |
| str = raw[i - 1]; |
| const state = new Proxy(defaultState, { | |
| set(target, value, reciver) { | |
| switch (value) { | |
| case "val": | |
| document.getElementById( | |
| "_6bb6g" | |
| ).textContent = `increment ${target.val} and ${target.val}`; | |
| break; | |
| case "val": |
| Context-File Typescript: ctxts |
| { | |
| "Context_Typescript": { | |
| "prefix": "ctxts", | |
| "body": [ | |
| "import React, { useReducer } from 'react';", | |
| "", | |
| "/* ***** */", | |
| "/* Types */", | |
| "/* ***** */", | |
| "interface Props {", |