Skip to content

Commit

Permalink
Fix overly sensitive typescript checker
Browse files Browse the repository at this point in the history
  • Loading branch information
TotallyInformation committed Oct 6, 2021
1 parent eb8a6c1 commit 5418acb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
13 changes: 13 additions & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** Define Global RED object so that VScode typescript stops whinging. */

declare var RED:any;

//import { EditorRED } from "node-red";

// declare global {
// var RED:any;
// }


// WARNING: See https://github.com/microsoft/TypeScript/issues/15626#issuecomment-933451904
// Don't put anything other than globals in this file
8 changes: 5 additions & 3 deletions globals.d.ts → index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@

import { Node } from 'node-red';

declare global {
var RED:any;
}
// See globals.d.ts for the global definitions
// The globals file can't contain anything else
// declare global {
// var RED:any;
// }

/**
* @typedef {object} uibNode Local copy of the node instance config + other info
Expand Down

0 comments on commit 5418acb

Please sign in to comment.