File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1+ export { } ; // ensures this is treated as a module
2+
3+ declare global {
4+ interface Number {
5+ isOdd ( ) : boolean ;
6+ isEven ( ) : boolean ;
7+ }
8+ }
9+
10+ Number . prototype . isOdd = function ( ) : boolean {
11+ return Number ( this ) % 2 !== 0 ;
12+ } ;
13+
14+ Number . prototype . isEven = function ( ) : boolean {
15+ return Number ( this ) % 2 === 0 ;
16+ } ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
1515// Ensures globally available type extensions.
1616import './extensions/stringExtensions' ;
1717import './extensions/parserExtensions' ;
18+ import './extensions/numberExtensions' ;
1819import { Workspace } from './project/workspace' ;
1920import { activateSemanticTokenProvider } from './capabilities/semanticTokens' ;
2021import { activateWorkspaceFolderCapability } from './capabilities/workspaceFolder' ;
You can’t perform that action at this time.
0 commit comments