Let's assume we have autotracking chain implementation. In general, we could be able to mark "accessed" properties, we could introduce "addToChain" function with 2 arguments,
1.) object (context) 2.) property we trying to access (on object)
like:
| 'use strict'; | |
| // eslint-disable-next-line node/no-extraneous-require | |
| const { MergeTrees } = require('broccoli-merge-trees'); | |
| // eslint-disable-next-line node/no-extraneous-require | |
| const Plugin = require('broccoli-plugin'); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| class ChunksWriter extends Plugin { |
| import Controller from '@ember/controller'; | |
| import { tracked } from '@glimmer/tracking'; | |
| import { getOwner } from '@ember/application'; | |
| import { cached } from 'tracked-toolbox'; | |
| import { scheduleOnce } from '@ember/runloop'; | |
| const Observers = []; | |
| class BasicObserver { | |
| tags = []; | |
| cb = null; |
| async function request() { | |
| const PromiseState = new WeakMap(); | |
| const resolveTimers = new Array(10).fill(null).map(() => Math.random() * 10000); | |
| const rejectTImers = new Array(10).fill(null).map(() => Math.random() * 10000); | |
| const promiseArgs = resolveTimers.map((_, i) => [resolveTimers[i], rejectTImers[i]]); | |
| let promises = promiseArgs.map(([resolveTimeout, rejectTimeout]) => { |
Let's assume we have autotracking chain implementation. In general, we could be able to mark "accessed" properties, we could introduce "addToChain" function with 2 arguments,
1.) object (context) 2.) property we trying to access (on object)
like:
| { | |
| "version":"0.1.0", | |
| "configurations":[ | |
| { | |
| "name": "Launch Tests", | |
| "type": "extensionHost", | |
| "request": "launch", | |
| "runtimeExecutable": "${execPath}", | |
| "args": [ | |
| "--extensionDevelopmentPath=${workspaceRoot}", |
| const stew = require('broccoli-stew'); | |
| const themeName = process.env.EMBER_THEME || 'default'; | |
| module.exports = { | |
| _registers: [], | |
| setupPreprocessorRegistry(type, registry, isFinal = false) { | |
| if (themeName === 'default') { | |
| return; |
| import Controller from "@ember/controller"; | |
| import agGrid from "agGrid"; | |
| import { schedule } from "@ember/runloop"; | |
| import { tracked } from "@glimmer/tracking"; | |
| import { action } from "@ember/object"; | |
| function createAgGridWrapper(component) { | |
| class Box { | |
| @tracked |
| { | |
| "each autocomplete": { | |
| "prefix": "{{#each", | |
| "body": [ | |
| "{{#each ${1:items} as |${2:item}|}}", | |
| " ${3:content}", | |
| "{{/each" | |
| ], | |
| "description": "each autocomplete" | |
| }, |
| class MyApp extends HTMLElement { | |
| constructor() { | |
| super(); | |
| this.shadow = this.attachShadow({ mode: 'open' }); | |
| this.shadow.classList = { | |
| contains: () => { return false } | |
| }; | |
| } | |
| connectedCallback() { | |
| const node = document.createElement('div'); |