This is illustrating issue with vscode
This file contains 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 type { CID } from 'multiformats' | |
/** | |
* Logical representation of a raw chunk of a file. | |
* | |
* TODO: Clarify when represenation is used instead of `FileChunk` | |
* representation. | |
*/ | |
export interface Raw extends PBNode { | |
Data: ByteView<{ |
This file contains 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 type { CID} from "multiformats" | |
import { Mtime } from "ipfs-unixfs" | |
export interface Lib { | |
/** | |
* Creates a directory importer that can be used to build up directory of | |
* files. It takes an optional queuing strategy parameter that can be used | |
* to specify how how many blocks can be queue internally before backpressure | |
* is applied and writer is blocked. This allows users to specify how much |
This file contains 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 { loop, recur } from './loop.js' | |
export const factorial = (n) => loop((n, acc) => n <= 1 ? acc : recur(n - 1, n * acc), n, 1) |
This file contains 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
/** | |
* @template T, X, A | |
* @typedef {import('./protocol').Process<T, X, A>} Process | |
*/ | |
/** | |
* @template X, T | |
* @typedef {import('./protocol').Task<X, T>} Task | |
*/ |
This file contains 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
interface CID { | |
code: number | |
version: number | |
multihash: Uint8Array | |
bytes: Uint8Array | |
} | |
type Future<T> = | |
| T | |
| Promise<T> |
This file contains 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
use async_std::task; | |
use juniper::{EmptyMutation, RootNode}; | |
struct Concrete; | |
enum CustomName { | |
Concrete(Concrete), | |
} | |
#[juniper::graphql_object] |
This file contains 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
type Tag { | |
id:ID | |
name: String! @fake(type:word) | |
} | |
type InlineLink { | |
id:ID | |
to:Resource! | |
name:String @examples(values: ["automerge", "pushpin", "local-first", "farm"]) | |
description:String @fake(type:words) |
This file contains 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
type DocID<a> = string | |
type Doc<a> = a | |
interface RepoService { | |
keys: KeyService | |
create<a>(doc: Doc<a>): Promise<DocID<a>> | |
read<a>(id: DocID<a>): Promise<a> | |
change<a>(id: DocID<a>, change: (doc: a) => void): Promise<void> | |
watch<a>(id: DocID<a>): AsyncIterator<a> |
This file contains 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
diff --git a/toolkit/components/extensions/ExtensionProtocol.jsm b/toolkit/components/extensions/ExtensionProtocol.jsm | |
new file mode 100644 | |
index 000000000000..723bc3c77f6c | |
--- /dev/null | |
+++ b/toolkit/components/extensions/ExtensionProtocol.jsm | |
@@ -0,0 +1,964 @@ | |
+/* This Source Code Form is subject to the terms of the Mozilla Public | |
+ * License, v. 2.0. If a copy of the MPL was not distributed with this | |
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
+"use strict" |