This technical design provides a comprehensive overview on the types and functionality necessary to correlate data gathered by the parsers
run over a variable number of contentDirectories
into a data structure that can both guide the transformations in the generate
phase as well be persisted across NPMify
runs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Tool Usage | |
Guidelines for Creating and Utilizing Tools in tools.py: | |
1. Initial Assessment: | |
- Before creating new tools, read through tools.py to understand the existing tools and their functionalities. | |
2. Tool Creation: | |
- Create new tools as functions within tools.py. If tools.py doesn't exist, create it. | |
- Ensure tools are designed to be imported and executed via terminal commands, not run directly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
#| What does our valof defunctionalize? |# | |
;; So far we fully defunctionalized environments and closures. Rather | |
;; than explicit higher-order function calls, we instead dispatch | |
;; against the choices, where we have represented each choice with a | |
;; corresponding data structure. | |
;; Josh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { makeVar } from '@apollo/client'; | |
import { Chip, FormControlLabel, InputBase } from '@material-ui/core'; | |
import React, { useCallback, useEffect, useRef, useState } from 'react'; | |
import { snackbarState } from 'state/snackbarState'; | |
import styled from 'styled-components'; | |
import { onEnterPress } from 'utils/helpers'; | |
import { millisToSeconds, secondsToMillis } from 'utils/time'; | |
const disableOtherChips = makeVar<boolean>(false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { applyMiddleware, createStore, Action, ActionCreator, Middleware, AnyAction } from "redux"; | |
import thunkMiddleware, { ThunkAction, ThunkMiddleware, ThunkDispatch } from "redux-thunk"; | |
interface IRootState { | |
derp: string; | |
} | |
const initialState: IRootState = { | |
derp: "fug" | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the type of the first argument of a function | |
type ArgumentType<T> = T extends (a: infer U) => any ? U : any; | |
// Get the head type from a tuple of types | |
type Head<T extends any[]> = T extends [infer H, ...any[]] ? H : never; | |
// Get the tail type from a tuple of types | |
type Tail<T extends any[]> = ((...t: T) => void) extends ((h: any, ...rest: infer R) => void) ? R : never; | |
// Get the Last type from a tuple of types |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-ignore @types/memfs does not exist | |
import {createFsFromVolume, Volume} from "memfs"; | |
import path from "path"; | |
// Create a mocked filesystem instance | |
const mockFs = createFsFromVolume(Volume.fromJSON({})); | |
jest.mock("fs", () => mockFs); | |
// Import modules that should be using the mocked filesystem | |
import {proteus} from "@proteus/core"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Polyfill indexOf. */ | |
var indexOf; | |
if (typeof Array.prototype.indexOf === 'function') { | |
indexOf = function (haystack, needle) { | |
return haystack.indexOf(needle); | |
}; | |
} else { | |
indexOf = function (haystack, needle) { | |
var i = 0, length = haystack.length, idx = -1, found = false; |
NewerOlder