Skip to content
Snippets Groups Projects
Unverified Commit 13199626 authored by Kai DeLorenzo's avatar Kai DeLorenzo :purple_heart:
Browse files

initial template

parent 6a1bdb19
No related branches found
No related tags found
No related merge requests found
*.js
\ No newline at end of file
{
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/strict",
"plugin:node/recommended"
],
"rules": {
"node/file-extension-in-import": [
"error",
"always"
],
"node/no-unpublished-import": [
"off"
]
}
}
\ No newline at end of file
node_modules
*.js
*.js.map
!build/script.js
\ No newline at end of file
{
"name": "bilibili",
"description": "Watch bilibili on Grayjay",
"author": "Kai DeLorenzo",
"authorUrl": "https://gitlab.com/kaidelorenzo",
"platformUrl": "https://bilibili.com",
"sourceUrl": "https://gitlab.com/kaidelorenzo/grayjay-bilibili.com-plugin/-/blob/main/config.json",
"repositoryUrl": "https://gitlab.com/kaidelorenzo/grayjay-bilibili.com-plugin",
"scriptUrl": "./script.js",
"version": 1,
"iconUrl": "./vimeo_icon_white_on_blue_rounded.png",
"id": "cf8ea74d-ad9b-489e-a083-539b6aa8648c",
"scriptSignature": "",
"scriptPublicKey": "",
"packages": [
"Http"
],
"allowEval": false,
"allowUrls": [
"bilibili.com"
]
}
\ No newline at end of file
const PLATFORM = "bilibili";
// global (to the file) variable to later access the configuration details of the plugin
// initialized when enabling the plugin
let config;
// Source Methods
const source_temp = {
enable: function (conf, settings, savedState) {
config = conf;
// log(config)
log(settings);
log(savedState);
},
disable: function () {
// console.log("disabling")
},
saveState: function () { return undefined; },
isChannelUrl: function (url) {
return false;
},
getChannel: function (url) {
return new PlatformChannel({
id: new PlatformID("Vimeo", "an id", config.id),
name: "a string",
thumbnail: "a string",
banner: "a string",
subscribers: 69,
description: "a string",
url: "a string",
});
},
isContentDetailsUrl: function (url) {
return false;
},
getContentDetails: function (url) {
const platform_video_ID = new PlatformID(PLATFORM, "video_ID", config.id);
const platform_creator_ID = new PlatformID(PLATFORM, "owner_ID", config.id);
const details = new PlatformVideoDetails({
id: platform_video_ID,
name: "a string",
//thumbnails: new Thumbnails(video_info.pictures.s,
author: new PlatformAuthorLink(platform_creator_ID, "a string", "a string", "a string", 69),
duration: 69,
viewCount: 69,
url: "a string",
isLive: false, // hardcoded for now
description: "a string",
video: new VideoSourceDescriptor([new DashSource({
url: "a string"
})]),
rating: new RatingLikes(69),
shareUrl: "a string",
uploadDate: 69
});
return details;
}
};
// assign the methods to the source object
for (const key of Object.keys(source_temp)) {
// @ts-expect-error TODO make it so that the ts-expect-error is no longer required
source[key] = source_temp[key];
}
function get_jwt() {
const authentication_url = "https://vimeo.com/_next/viewer";
const authentication_response_json = http.GET(authentication_url, new Map(), false).body;
const authentication_response = JSON.parse(authentication_response_json);
return authentication_response.jwt;
}
// export statements removed during build step
//# sourceMappingURL=script.js.map
\ No newline at end of file
build/vimeo_icon_white_on_blue_rounded.png

3.66 KiB

This diff is collapsed.
{
"name": "grayjay-bilibili.com-plugin",
"version": "1.0.0",
"description": "make bilibili work",
"engines": {
"node": ">=20.0.0"
},
"module": "script.ts",
"scripts": {
"test": "npm run build && node --test",
"build": "tsc && cp src/script.js build/script.js && sed -i '/^export/ d' build/script.js",
"serve": "npm run build && npx http-server build"
},
"repository": {
"type": "git",
"url": "git+https://gitlab.com/kaidelorenzo/grayjay-bilibili.com-plugin.git"
},
"keywords": [
"bilibili",
"grayjay"
],
"author": "Kai DeLorenzo",
"license": "MPL-2.0",
"bugs": {
"url": "https://gitlab.com/kaidelorenzo/grayjay-bilibili.com-plugin/issues"
},
"homepage": "https://gitlab.com/kaidelorenzo/grayjay-bilibili.com-plugin",
"peerDependencies": {
"typescript": "^5.0.0"
},
"type": "module",
"devDependencies": {
"@grayjay/plugin": "gitlab:kaidelorenzo/grayjay-plugin-types",
"@types/node": "^20.11.30",
"eslint": "^8.57.0",
"eslint-plugin-node": "^11.1.0",
"http-server": "^14.1.1",
"typescript-eslint": "^7.4.0"
}
}
//Reference Scriptfile
//Intended exclusively for auto-complete in your IDE, not for execution
declare class ScriptException extends Error {
//If only one parameter is provided, acts as msg
constructor(type: string, msg: string);
}
declare class LoginRequiredException extends ScriptException {
constructor(msg: string);
}
//Alias
declare class ScriptLoginRequiredException extends ScriptException {
constructor(msg: string);
}
declare class CaptchaRequiredException extends ScriptException {
constructor(url: string, body: string);
}
declare class CriticalException extends ScriptException {
constructor(msg: string);
}
declare class UnavailableException extends ScriptException {
constructor(msg: string);
}
declare class AgeException extends ScriptException {
constructor(msg: string);
}
declare class TimeoutException extends ScriptException {
constructor(msg: string);
}
declare class ScriptImplementationException extends ScriptException {
constructor(msg: string);
}
declare class Thumbnails {
constructor(thumbnails: Thumbnail[])
}
declare class Thumbnail {
constructor(url, quality) {
this.url = url ?? ""; //string
this.quality = quality ?? 0; //integer
}
}
declare class PlatformID {
constructor(platform: string, id: string, pluginId: string, claimType: int = 0, claimFieldType: integer = -1);
}
declare class ResultCapabilities {
constructor(types: string[], sorts: string[], filters: FilterGroup[])
}
declare class FilterGroup {
constructor(name: string, filters: string[], isMultiSelect: boolean, id: string);
}
declare class FilterCapability {
constructor(name: string, value: string, id: string);
}
declare class PlatformAuthorLink {
constructor(id: PlatformID, name: string, url: string, thumbnail: string, subscribers: integer?, membershipUrl: string?);
}
declare class PlatformAuthorMembershipLink {
constructor(id: PlatformID, name: string, url: string, thumbnail: string, subscribers: integer?, membershipUrl: string?);
}
declare interface PlatformContentDef {
id: PlatformID,
name: string,
thumbnails: Thumbnails,
author: PlatformAuthorLink,
datetime: integer,
url: string
}
declare interface PlatformContent {}
declare interface PlatformNestedMediaContentDef extends PlatformContentDef {
contentUrl: string,
contentName: string?,
contentDescription: string?,
contentProvider: string?,
contentThumbnails: Thumbnails
}
declare class PlatformNestedMediaContent {
constructor(obj: PlatformNestedMediaContentDef);
}
declare interface PlatformLockedContentDef extends PlatformContentDef {
contentName: string?,
contentThumbnails: Thumbnails?,
unlockUrl: string,
lockDescription: string?,
}
declare class PlatformLockedContent {
constructor(obj: PlatformLockedContentDef);
}
declare interface PlatformVideoDef extends PlatformContentDef {
thumbnails: Thumbnails,
author: PlatformAuthorLink,
duration: int,
viewCount: long,
isLive: boolean,
shareUrl: string?
}
declare class PlatformVideo implements PlatformContent {
constructor(obj: PlatformVideoDef);
}
declare interface PlatformVideoDetailsDef extends PlatformVideoDef {
description: string,
video: VideoSourceDescriptor,
live: IVideoSource,
rating: IRating,
subtitles: SubtitleSource[]
}
declare class PlatformVideoDetails extends PlatformVideo {
constructor(obj: PlatformVideoDetailsDef);
}
declare interface PlatformPostDef extends PlatformContentDef {
thumbnails: string[],
images: string[],
description: string
}
declare class PlatformPost extends PlatformContent {
constructor(obj: PlatformPostDef)
}
declare interface PlatformPostDetailsDef extends PlatformPostDef {
rating: IRating,
textType: int,
content: String
}
declare class PlatformPostDetails extends PlatformPost {
constructor(obj: PlatformPostDetailsDef);
}
//Sources
declare interface IVideoSourceDescriptor {}
declare interface MuxVideoSourceDescriptorDef {
isUnMuxed: boolean,
videoSources: VideoSource[]
}
declare class VideoSourceDescriptor implements IVideoSourceDescriptor {
constructor(videoSourcesOrObj: VideoSource[]);
}
declare interface UnMuxVideoSourceDescriptorDef {
isUnMuxed: boolean,
videoSources: VideoSource[]
}
class UnMuxVideoSourceDescriptor implements IVideoSourceDescriptor {
constructor(videoSourcesOrObj: VideoSource[], audioSources: AudioSource[]);
constructor(videoSourcesOrObj: UnMuxVideoSourceDescriptorDef);
}
declare interface IVideoSource {
}
declare interface IAudioSource {
}
declare interface VideoUrlSourceDef implements IVideoSource {
width: integer,
height: integer,
container: string,
codec: string,
name: string,
bitrate: integer,
duration: integer,
url: string
}
declare class VideoUrlSource {
constructor(obj: VideoUrlSourceDef);
getRequestModifier(): RequestModifier?;
}
declare interface VideoUrlRangeSourceDef extends VideoUrlSource {
itagId: integer,
initStart: integer,
initEnd: integer,
indexStart: integer,
indexEnd: integer,
}
declare class VideoUrlRangeSource extends VideoUrlSource {
constructor(obj: YTVideoSourceDef);
}
declare interface AudioUrlSourceDef {
name: string,
bitrate: integer,
container: string,
codecs: string,
duration: integer,
url: string,
language: string
}
declare class AudioUrlSource implements IAudioSource {
constructor(obj: AudioUrlSourceDef);
getRequestModifier(): RequestModifier?;
}
declare interface AudioUrlRangeSourceDef extends AudioUrlSource {
itagId: integer,
initStart: integer,
initEnd: integer,
indexStart: integer,
indexEnd: integer,
audioChannels: integer
}
declare class AudioUrlRangeSource extends AudioUrlSource {
constructor(obj: AudioUrlRangeSourceDef);
}
declare interface HLSSourceDef {
name: string,
duration: integer,
url: string,
priority: boolean?,
language: string?
}
declare class HLSSource implements IVideoSource {
constructor(obj: HLSSourceDef);
}
declare interface DashSourceDef {
name: string,
duration: integer,
url: string,
language: string?
}
declare class DashSource implements IVideoSource {
constructor(obj: DashSourceDef)
}
declare interface IRequest {
url: string,
headers: Map<string, string>
}
declare interface IRequestModifierDef {
allowByteSkip: boolean
}
declare class RequestModifier {
constructor(obj: IRequestModifierDef) { }
modifyRequest(url: string, headers: Map<string, string>): IRequest;
}
//Channel
declare interface PlatformChannelDef {
id: PlatformID,
name: string,
thumbnail: string,
banner: string,
subscribers: integer,
description: string,
url: string,
urlAlternatives: string[],
links: Map<string>?
}
declare class PlatformChannel {
constructor(obj: PlatformChannelDef);
}
//Playlist
declare interface PlatformPlaylistDef implements PlatformContent {
videoCount: integer,
thumbnail: string
}
declare class PlatformPlaylist extends PlatformContent {
constructor(obj: PlatformPlaylistDef);
}
declare interface PlatformPlaylistDetailsDef implements PlatformPlaylistDef {
contents: ContentPager
}
declare class PlatformPlaylistDetails extends PlatformContent {
constructor(obj: PlatformPlaylistDetailsDef);
}
//Ratings
interface IRating {
type: integer
}
declare class RatingLikes implements IRating {
constructor(likes: integer);
}
declare class RatingLikesDislikes implements IRating {
constructor(likes: integer, dislikes: integer);
}
declare class RatingScaler implements IRating {
constructor(value: double);
}
declare interface CommentDef {
contextUrl: string,
author: PlatformAuthorLink,
message: string,
rating: IRating,
date: long,
replyCount: int,
context: any
}
declare class PlatformComment {
constructor(obj: CommentDef);
}
declare class PlaybackTracker {
constructor(interval: integer);
setProgress(seconds: integer);
}
declare class LiveEventPager {
nextRequest = 4000;
constructor(results: LiveEvent[], hasMore: boolean, context: any);
hasMorePagers(): boolean
nextPage(): LiveEventPager; //Could be self
}
declare class LiveEvent {
constructor(type: integer);
}
declare class LiveEventComment extends LiveEvent {
constructor(name: string, message: string, thumbnail: string?, colorName: string?, badges: string[]);
}
declare class LiveEventEmojis extends LiveEvent {
constructor(name: Map<string>);
}
declare class LiveEventDonation extends LiveEvent {
constructor(amount: integer, name: string, message: string, thumbnail: string?, expire: Int, colorDonation: string?);
}
declare class LiveEventViewCount extends LiveEvent {
constructor(viewCount: integer);
}
declare class LiveEventRaid extends LiveEvent {
constructor(targetUrl: string, targetName: string, targetThumbnail: string);
}
//Pagers
declare class ContentPager {
constructor(results: PlatformContent[], hasMore: boolean);
hasMorePagers(): boolean
nextPage(): ContentPager?; //Could be self
}
declare class VideoPager {
constructor(results: PlatformVideo[], hasMore: boolean);
hasMorePagers(): boolean
nextPage(): VideoPager?; //Could be self
}
declare class ChannelPager {
constructor(results: PlatformChannel[], hasMore: boolean);
hasMorePagers(): boolean;
nextPage(): ChannelPager?; //Could be self
}
declare class PlaylistPager {
constructor(results: PlatformPlaylist[], hasMore: boolean);
hasMorePagers(): boolean;
nextPage(): PlaylistPager?;
}
declare class CommentPager {
constructor(results: PlatformComment[], hasMore: boolean);
hasMorePagers(): boolean
nextPage(): CommentPager?; //Could be self
}
interface Map<T> {
[Key: string]: T;
}
//To override by plugin
interface Source {
getHome(): VideoPager;
enable(config: SourceConfig, settings: Any, savedState: string?);
disable();
saveState(): string;
searchSuggestions(query: string): string[];
search(query: string, type: string, order: string, filters): ContentPager;
getSearchCapabilities(): ResultCapabilities
//Optional
searchChannelContents(channelUrl: string, query: string, type: string, order: string, filters): ContentPager;
//Optional
getSearchChannelContentsCapabilities(): ResultCapabilities;
//Optional
getChannelUrlByClaim(claimType: int, values: Map<Int, String>)
isChannelUrl(url: string): boolean;
getChannel(url: string): PlatformChannel;
getChannelContents(url: string, type: string, order: string, filters): ContentPager;
getChannelCapabilities(): ResultCapabilities;
isContentDetailsUrl(url: string): boolean;
getContentDetails(url: string): PlatformContentDetails;
//Optional
getLiveEvents(url: string): LiveEventPager;
//Optional
getComments(url: string): CommentPager;
//Optional
getSubComments(comment: PlatformComment): CommentPager;
//Optional
getUserSubscriptions(): string[];
//Optional
getUserPlaylists(): string[];
//Optional
isPlaylistUrl(url: string): boolean;
//Optional
getPlaylist(url): string[];
}
const source: Source;
This diff is collapsed.
import { describe, test } from "node:test"
import assert from "node:assert"
import "@grayjay/plugin/source.js"
import { get_jwt } from "./script.js"
describe("script module", () => {
test("get jwt", () => {
const result = get_jwt()
assert.strictEqual(result.length, 196)
})
test("test disable", () => {
if (source.disable === undefined){
throw new Error("Missing disable method")
}
source.disable()
})
})
import type { RequiredSource, AuthenticationResponse } from "./types.d.ts"
const PLATFORM = "bilibili" as const
type Settings = unknown
// global (to the file) variable to later access the configuration details of the plugin
// initialized when enabling the plugin
let config: SourceConfig
// Source Methods
const source_temp: RequiredSource = {
enable: function (conf: SourceConfig, settings: Settings, savedState: string | undefined) {
config = conf
// log(config)
log(settings)
log(savedState)
},
disable: function () {
// console.log("disabling")
},
saveState: function () { return undefined },
isChannelUrl: function (url: string) {
return false
},
getChannel: function (url: string) {
return new PlatformChannel({
id: new PlatformID("Vimeo", "an id", config.id),
name: "a string",
thumbnail: "a string",
banner: "a string",
subscribers: 69,
description: "a string",
url: "a string",
})
},
isContentDetailsUrl: function (url: string) {
return false
},
getContentDetails: function (url: string) {
const platform_video_ID = new PlatformID(PLATFORM, "video_ID", config.id)
const platform_creator_ID = new PlatformID(PLATFORM, "owner_ID", config.id)
const details: PlatformContentDetails = new PlatformVideoDetails({
id: platform_video_ID,
name: "a string",
//thumbnails: new Thumbnails(video_info.pictures.s,
author: new PlatformAuthorLink(
platform_creator_ID,
"a string",
"a string",
"a string",
69
),
duration: 69,
viewCount: 69,
url: "a string",
isLive: false, // hardcoded for now
description: "a string",
video: new VideoSourceDescriptor([new DashSource({
url: "a string"
})]),
rating: new RatingLikes(69),
shareUrl: "a string",
uploadDate: 69
})
return details
}
}
// assign the methods to the source object
for (const key of Object.keys(source_temp)) {
// @ts-expect-error TODO make it so that the ts-expect-error is no longer required
source[key] = source_temp[key]
}
function get_jwt() {
const authentication_url = "https://vimeo.com/_next/viewer"
const authentication_response_json = http.GET(authentication_url, new Map(), false).body
const authentication_response: AuthenticationResponse = JSON.parse(authentication_response_json)
return authentication_response.jwt
}
// export statements removed during build step
export { get_jwt }
export type AuthenticationResponse = {
jwt: string
}
export type RequiredSource = Required<Source>
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
/* Language and Environment */
"target": "esnext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
"moduleDetection": "force", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "esnext", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
"moduleResolution": "bundler", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["node_modules/@types", "node_modules/@grayjay"], /* Specify multiple folders that act like './node_modules/@types'. */
// "types": ["grayjay-plugin-types"], /* Specify type package names to be included without being referenced in a source file. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
// "resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
/* JavaScript Support */
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
"sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
// "outDir": "./", /* Specify an output folder for all emitted files. */
// "removeComments": true, /* Disable emitting comments. */
// "noEmit": true, /* Disable emitting files from a compilation. */
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
// "newLine": "crlf", /* Set the newline character for emitting files. */
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
/* Interop Constraints */
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
"exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
"noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
"noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
/* Completeness */
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment