I will try to give a more in-depth explanation of my comment. What you are doing seams to be an old school JavaScript coding the type of coding TypeScript was invented to prevent. In JavaScript you have two type of "empty" values that are similar but not the same null and undefined. For a while now in TypeScript all values are non nulluble by default that means unlike in JavaScript you will get a compiler error if you try to put null or undefined in a function. So if your somefunction looks like this.
function someFunction(success: (token: string) => void, error: (error:string) => void) {
}
A call like somefunction(null, (e) =>{}) will not compile at all because everything is not nullable by default. And you must give it an empty callback like somefunction(()=>{}, () =>{}) you can see that you don't event need the token parameter because any paraatreless function can be cast to a parameter function.
If the creator of some function allowed "null" in type script he would have defined like so
function someFunction(success?: (token: string) => void, error?: (error:string) => void) {
}
Where the ? is a shorter way of writing () => void | undefined. Now you can call it with
someFunction(undefined, ()=>{}); but a call someFunction(null, ()=>{}); will produce an error since null is not equal (===) undefined. This is the most common way to allow empty calls to functions in TypeScript. If you really want a null value you can define somefunction like so
function someFunction(success: ((token: string) => void) | null, error: ((error:string) => void) | null) {
}
This is really uncommon in typescript and way two if what most people use.
But since you asked about "best practices" from what I can see what you are doing is some async workflow and modern JavaScript and typescript tend to preferer Promises and in angular Observables(The two are not mutually exclusive and can work well together).
() => {}or() => 0because you're then respecting the method signature (i.e. passing in a function when a function is expected). Passing in null would require checking for null in someFunction, which may lead to uncertainty down the line as to which params of which functions are null-checked and which are not.catchfunction on it to only worry about the error.