TypeScript Handbook TypeScript 4 8 Typescriptlang Org instant download
TypeScript Handbook TypeScript 4 8 Typescriptlang Org instant download
https://ebookmeta.com/product/typescript-handbook-
typescript-4-8-typescriptlang-org-2/
https://ebookmeta.com/product/typescript-handbook-
typescript-4-8-typescriptlang-org-2/
https://ebookmeta.com/product/typescript-handbook-
typescript-4-7-typescriptlang-org/
https://ebookmeta.com/product/essential-typescript-4-2nd-edition-
adam-freeman/
https://ebookmeta.com/product/an-analysis-of-john-lockes-two-
treatises-of-government-the-macat-library-1st-edition-jeremy-
kleidosty/
Next Generation Supply Chains: A Roadmap for Research
and Innovation (Lecture Notes in Management and
Industrial Engineering) Rosanna Fornasiero (Editor)
https://ebookmeta.com/product/next-generation-supply-chains-a-
roadmap-for-research-and-innovation-lecture-notes-in-management-
and-industrial-engineering-rosanna-fornasiero-editor/
https://ebookmeta.com/product/where-there-is-no-dentist-murray-
dickson/
https://ebookmeta.com/product/the-windows-of-life-revised-
edition-ephraim-e-itaman/
https://ebookmeta.com/product/the-future-and-the-past-a-
translation-and-study-of-the-gukansho-an-interpretative-history-
of-japan-written-in-1219-delmer-brown-editor/
https://ebookmeta.com/product/lonely-planet-mallorca-6th-edition-
laura-mcveigh/
Beautiful Sins Lords of Night 1 1st Edition Cecilia
Lane Lane Cecilia
https://ebookmeta.com/product/beautiful-sins-lords-of-
night-1-1st-edition-cecilia-lane-lane-cecilia/
This copy of the TypeScript handbook was
created on Wednesday, September 28, 2022
against commit c3f0d8 with TypeScript 4.8.
Table of Contents
The most common kinds of errors that programmers write can be described as type errors: a
certain kind of value was used where a different kind of value was expected. This could be due to
simple typos, a failure to understand the API surface of a library, incorrect assumptions about
runtime behavior, or other errors. The goal of TypeScript is to be a static typechecker for JavaScript
programs - in other words, a tool that runs before your code runs (static) and ensures that the types
of the program are correct (typechecked).
If you are coming to TypeScript without a JavaScript background, with the intention of TypeScript
being your first language, we recommend you first start reading the documentation on either the
Microsoft Learn JavaScript tutorial or read JavaScript at the Mozilla Web Docs. If you have
experience in other languages, you should be able to pick up JavaScript syntax quite quickly by
reading the handbook.
The Handbook
You should expect each chapter or page to provide you with a strong understanding of the given
concepts. The TypeScript Handbook is not a complete language specification, but it is intended to
be a comprehensive guide to all of the language's features and behaviors.
A reader who completes the walkthrough should be able to:
In the interests of clarity and brevity, the main content of the Handbook will not explore every
edge case or minutiae of the features being covered. You can find more details on particular
concepts in the reference articles.
Reference Files
The reference section below the handbook in the navigation is built to provide a richer
understanding of how a particular part of TypeScript works. You can read it top-to-bottom, but
each section aims to provide a deeper explanation of a single concept - meaning there is no aim
for continuity.
Non-Goals
The Handbook is also intended to be a concise document that can be comfortably read in a few
hours. Certain topics won't be covered in order to keep things short.
Specifically, the Handbook does not fully introduce core JavaScript basics like functions, classes, and
closures. Where appropriate, we'll include links to background reading that you can use to read up
on those concepts.
The Handbook also isn't intended to be a replacement for a language specification. In some cases,
edge cases or formal descriptions of behavior will be skipped in favor of high-level, easier-to-
understand explanations. Instead, there are separate reference pages that more precisely and
formally describe many aspects of TypeScript's behavior. The reference pages are not intended for
readers unfamiliar with TypeScript, so they may use advanced terminology or reference topics you
haven't read about yet.
Finally, the Handbook won't cover how TypeScript interacts with other tools, except where
necessary. Topics like how to configure TypeScript with webpack, rollup, parcel, react, babel, closure,
lerna, rush, bazel, preact, vue, angular, svelte, jquery, yarn, or npm are out of scope - you can find
these resources elsewhere on the web.
Get Started
Before getting started with The Basics, we recommend reading one of the following introductory
pages. These introductions are intended to highlight key similarities and differences between
TypeScript and your favored programming language, and clear up common misconceptions
specific to those languages.
// Calling 'message'
message();
If we break this down, the first runnable line of code accesses a property called toLowerCase and
then calls it. The second one tries to call message directly.
But assuming we don't know the value of message - and that's pretty common - we can't reliably
say what results we'll get from trying to run any of this code. The behavior of each operation
depends entirely on what value we had in the first place.
Is message callable?
The answers to these questions are usually things we keep in our heads when we write JavaScript,
and we have to hope we got all the details right.
As you can probably guess, if we try to run message.toLowerCase() , we'll get the same string
only in lower-case.
What about that second line of code? If you're familiar with JavaScript, you'll know this fails with an
exception:
When we run our code, the way that our JavaScript runtime chooses what to do is by figuring out
the type of the value - what sorts of behaviors and capabilities it has. That's part of what that
TypeError is alluding to - it's saying that the string "Hello World!" cannot be called as a
function.
For some values, such as the primitives string and number , we can identify their type at runtime
using the typeof operator. But for other things like functions, there's no corresponding runtime
mechanism to identify their types. For example, consider this function:
function fn(x) {
return x.flip();
}
We can observe by reading the code that this function will only work if given an object with a
callable flip property, but JavaScript doesn't surface this information in a way that we can check
while the code is running. The only way in pure JavaScript to tell what fn does with a particular
value is to call it and see what happens. This kind of behavior makes it hard to predict what code
will do before it runs, which means it's harder to know what your code is going to do while you're
writing it.
Seen in this way, a type is the concept of describing which values can be passed to fn and which
will crash. JavaScript only truly provides dynamic typing - running the code to see what happens.
The alternative is to use a static type system to make predictions about what code is expected
before it runs.
Static type-checking
Think back to that TypeError we got earlier from trying to call a string as a function. Most
people don't like to get any sorts of errors when running their code - those are considered bugs!
And when we write new code, we try our best to avoid introducing new bugs.
If we add just a bit of code, save our file, re-run the code, and immediately see the error, we might
be able to isolate the problem quickly; but that's not always the case. We might not have tested the
feature thoroughly enough, so we might never actually run into a potential error that would be
thrown! Or if we were lucky enough to witness the error, we might have ended up doing large
refactorings and adding a lot of different code that we're forced to dig through.
Ideally, we could have a tool that helps us find these bugs before our code runs. That's what a static
type-checker like TypeScript does. Static types systems describe the shapes and behaviors of what
our values will be when we run our programs. A type-checker like TypeScript uses that information
and tells us when things might be going off the rails.
message();
This
This expression
expression is
is not
not callable.
callable.
Type
Type 'String'
'String' has
has no
no call
call signatures.
signatures.
Running that last sample with TypeScript will give us an error message before we run the code in
the first place.
Non-exception Failures
So far we've been discussing certain things like runtime errors - cases where the JavaScript runtime
tells us that it thinks something is nonsensical. Those cases come up because the ECMAScript
specification has explicit instructions on how the language should behave when it runs into
something unexpected.
For example, the specification says that trying to call something that isn't callable should throw an
error. Maybe that sounds like "obvious behavior", but you could imagine that accessing a property
that doesn't exist on an object should throw an error too. Instead, JavaScript gives us different
behavior and returns the value undefined :
const user = {
name: "Daniel",
age: 26,
};
const user = {
name: "Daniel",
age: 26,
};
user.location;
Property
Property 'location'
'location' does
does not
not exist
exist on
on type
type '{
'{ name:
name: string;
string; age:
age: number;
number;
}'. }'.
While sometimes that implies a trade-off in what you can express, the intent is to catch legitimate
bugs in our programs. And TypeScript catches a lot of legitimate bugs.
uncalled functions,
function flipCoin() {
// Meant to be Math.random()
return Math.random < 0.5;
Operator
Operator '<'
'<' cannot
cannot be
be applied
applied to
to types
types '()
'() =>
=> number'
number' and
and 'number'.
'number'.
This
This condition
condition will
will always
always return
return 'false'
'false' since
since the
the types
types '"a"'
'"a"' and
and '"b"'
'"b"'
have nohave
overlap.
no overlap.
// Oops, unreachable
}
The type-checker has information to check things like whether we're accessing the right properties
on variables and other properties. Once it has that information, it can also start suggesting which
properties you might want to use.
That means TypeScript can be leveraged for editing code too, and the core type-checker can
provide error messages and code completion as you type in the editor. That's part of what people
often refer to when they talk about tooling in TypeScript.
sendfile
app.listen(3000);
sendFile
TypeScript takes tooling seriously, and that goes beyond completions and errors as you type. An
editor that supports TypeScript can deliver "quick fixes" to automatically fix errors, refactorings to
easily re-organize code, and useful navigation features for jumping to definitions of a variable, or
finding all references to a given variable. All of this is built on top of the type-checker and is fully
cross-platform, so it's likely that your favorite editor has TypeScript support available.
tsc , the TypeScript compiler
We've been talking about type-checking, but we haven't yet used our type-checker. Let's get
acquainted with our new friend tsc , the TypeScript compiler. First we'll need to grab it via npm.
This installs the TypeScript Compiler tsc globally. You can use npx or similar tools if you'd prefer to
run tsc from a local node_modules package instead.
Now let's move to an empty folder and try writing our first TypeScript program: hello.ts :
Notice there are no frills here; this "hello world" program looks identical to what you'd write for a
"hello world" program in JavaScript. And now let's type-check it by running the command tsc
which was installed for us by the typescript package.
tsc hello.ts
Tada!
Wait, "tada" what exactly? We ran tsc and nothing happened! Well, there were no type errors, so
we didn't get any output in our console since there was nothing to report.
But check again - we got some file output instead. If we look in our current directory, we'll see a
hello.js file next to hello.ts . That's the output from our hello.ts file after tsc compiles
or transforms it into a plain JavaScript file. And if we check the contents, we'll see what TypeScript
spits out after it processes a .ts file:
greet("Brendan");
If we run tsc hello.ts again, notice that we get an error on the command line!
TypeScript is telling us we forgot to pass an argument to the greet function, and rightfully so. So
far we've only written standard JavaScript, and yet type-checking was still able to find problems
with our code. Thanks TypeScript!
To reiterate from earlier, type-checking code limits the sorts of programs you can run, and so there's
a tradeoff on what sorts of things a type-checker finds acceptable. Most of the time that's okay, but
there are scenarios where those checks get in the way. For example, imagine yourself migrating
JavaScript code over to TypeScript and introducing type-checking errors. Eventually you'll get
around to cleaning things up for the type-checker, but that original JavaScript code was already
working! Why should converting it over to TypeScript stop you from running it?
So TypeScript doesn't get in your way. Of course, over time, you may want to be a bit more
defensive against mistakes, and make TypeScript act a bit more strictly. In that case, you can use the
noEmitOnError compiler option. Try changing your hello.ts file and running tsc with that
flag:
Explicit Types
Up until now, we haven't told TypeScript what person or date are. Let's edit the code to tell
TypeScript that person is a string , and that date should be a Date object. We'll also use the
toDateString() method on date .
What we did was add type annotations on person and date to describe what types of values
greet can be called with. You can read that signature as " greet takes a person of type
string , and a date of type Date ".
With this, TypeScript can tell us about other cases where greet might have been called incorrectly.
For example...
greet("Maddison", Date());
Argument
Argument of
of type
type 'string'
'string' is
is not
not assignable
assignable to
to parameter
parameter of
of type
type 'Date'.
'Date'.
Keep in mind, we don't always have to write explicit type annotations. In many cases, TypeScript can
even just infer (or "figure out") the types for us even if we omit them.
Even though we didn't tell TypeScript that msg had the type string it was able to figure that out.
That's a feature, and it's best not to add annotations when the type system would end up inferring
the same type anyway.
Note: The message bubble inside the previous code sample is what your editor would show if you had
hovered over the word.
Erased Types
Let's take a look at what happens when we compile the above function greet with tsc to output
JavaScript:
"use strict";
function greet(person, date) {
console.log("Hello ".concat(person, ", today is ").concat(date.toDateS
}
greet("Maddison", new Date());
Notice two things here:
More on that second point later, but let's now focus on that first point. Type annotations aren't part
of JavaScript (or ECMAScript to be pedantic), so there really aren't any browsers or other runtimes
that can just run TypeScript unmodified. That's why TypeScript needs a compiler in the first place -
it needs some way to strip out or transform any TypeScript-specific code so that you can run it.
Most TypeScript-specific code gets erased away, and likewise, here our type annotations were
completely erased.
Remember: Type annotations never change the runtime behavior of your program.
Downleveling
One other difference from the above was that our template string was rewritten from
to
Template strings are a feature from a version of ECMAScript called ECMAScript 2015 (a.k.a.
ECMAScript 6, ES2015, ES6, etc. - don't ask). TypeScript has the ability to rewrite code from newer
versions of ECMAScript to older ones such as ECMAScript 3 or ECMAScript 5 (a.k.a. ES3 and ES5).
This process of moving from a newer or "higher" version of ECMAScript down to an older or
"lower" one is sometimes called downleveling.
By default TypeScript targets ES3, an extremely old version of ECMAScript. We could have chosen
something a little bit more recent by using the target option. Running with --target es2015
changes TypeScript to target ECMAScript 2015, meaning code should be able to run wherever
ECMAScript 2015 is supported. So running tsc --target es2015 hello.ts gives us the
following output:
Another Random Scribd Document
with Unrelated Content
"Nay, nay!" said Blanche Delaware. "I have said nothing in their
favor. What makes you believe I admire them more than yourself?"
"But if you own that, and feel that," said Blanche Delaware, "why
can not you admire the same beauties!"
"Of course," replied Burrel, "there are moments when the cool
and pleasant juice of a peach, or the simple refreshment of a glass
of lemonade will be delightful; and in such moments it is, that he
feels he has stimulated away a sense, and a delightful one. Thus
with poetry, and literature in general; the mind, by reading a great
many things it would be better without, loses its relish for every
thing that does not excite and heat the imagination, which is neither
more nor less than the mental palate; and though there are
moments when the heart, softened and at ease, finds joys in all the
sweet simplicity which would have charmed it forever in an
unsophisticated state, yet still it returns to Cayenne pepper, and only
remembers the other feelings, as of pleasures lost forever. With
regard to Wordsworth's poetry, perhaps no one ever did him more
injustice than I did once. With a very superficial knowledge of his
works, I fancied that I despised them all; and it was only from being
bored about them by his admirers, that I determined to read them
every line, that I might hate them with the more accuracy."
"I am not doing so now, I can assure you," replied Burrel. "What I
state is exactly the fact. I sat down to read Wordsworth's works with
a determination to dislike them, and I succeeded in one or two
poems, which have been cried up to the skies; but, as I went on, I
found so often a majestic spirit of poetical philosophy, clothing itself
in the full sublime of simplicity, that I felt reproved and abashed, and
I read again with a better design. In doing so, though I still felt that
there was much amidst all the splendor that I could neither like nor
admire, yet I perceived how and why others might and would find
great beauties and infinite sweetness in that which palled upon my
taste; and I perceived also, that the fault lay in me far more than in
the poetry. The beauties I felt more than ever; and some of the
smaller pieces, I am convinced, will live for ages, with the works of
Shakspeare and Milton."
"They will, indeed," said Sir Sidney Delaware, "as long as there is
a taste in man. Nevertheless, the poet--who is, perhaps, as great a
philosopher, too, as ever lived--has sacrificed, like many
philosophers, an immense gift of genius to a false hypothesis in
regard to his art, and has, consequently, systematically poured forth
more trash than perhaps any man living. His poems, collected,
always put me in mind of an account I have somewhere read of the
diamond mines of Golconda, where inestimable jewels are found
mingled with masses of soft mud. But you have long done breakfast,
Mr. Burrel. Come, Blanche, I am going to take Mr. Burrel to the
terrace, and descant most dully on all the antiquities of the house.
Let us have your company, my love; for we shall meet with so many
old things, it may be as well to have something young to relieve
them!"
The whole party sallied forth; and as people who like each other,
and whose ideas are not common-place, can make an agreeable
conversation out of any thing, the walk round the old house, and the
investigation of every little turn and corner of the building, passed
over most pleasantly to all, although Blanche and her brother knew
not only every stone in the edifice, but every word almost that could
be said upon them. They were accustomed, however, to look upon
their father with so much affection and reverence; and the
misfortunes under which he labored had mingled so much
tenderness with their love, that "an oft-told tale" from his lips lost its
tediousness, being listened to by the ears of deep regard. Burrel,
too, was all attention; and, while Sir Sidney Delaware descanted
learnedly on the buttery, and the wet and dry larder, and the prior's
parlor, and the scriptorium, and pointed out the obtuse Gothic
arches described from four centers, which characterize the
architecture of Henry VIII., he filled up all the pauses with some new
and original observation on the same theme; and though certainly
not so learned on the subject as Sir Sidney himself, yet he showed
that, at all events, he possessed sufficient information to feel an
interest therein, and to furnish easily the matter for more erudite
rejoinder.
The whole party were of the class of people who have eyes--as
that delightful little book the Evenings at Home has it--and at
present, though there were busy thoughts in the bosoms, at least of
two of those present, yet perhaps they strove the more to turn their
conversation to external things, from the consciousness of the
feelings passing within. Those feelings, however, had their effect, as
they ever must have, even when the topics spoken of are the most
indifferent. They gave life, and spirit, and brightness to every thing.
He felt at every step that the moments near her were almost too
delightful; and, before he had got to the end of that walk, he had
reached the point where love begins to grow terrified at its own
intensity, lest the object should be lost on which the mighty stake of
happiness is cast forever.
CHAPTER IX.
In the house of Lord Ashborough--which is situated in Grosvenor-
square, fronting the south--there is a large room, which in form
would be a parallelogram, did not one of the shorter sides--which,
being turned to the north, looks out upon the little rood of garden
attached to the dwelling--bow out into the form of a bay window.
The room is lofty, and, as near as possible, twenty-eight feet in
length by twenty-four in breadth. Book-cases, well stored with tomes
in lettered calf, cover the walls, and a carpet, in which the foot sinks,
is spread over the floor. Three large tables occupy different parts of
the room. Two covered with books and prints lie open to the world in
general, but the third, on which stand inkstands and implements for
writing, shows underneath, in the carved lines of the highly-polished
British oak, many a locked drawer. Each chair, so fashioned that
uneasy must be the back that would not there find rest, rolls
smoothly on noiseless casters, and the thick walls, the double doors,
and book-cases, all combine to prevent any sound from within being
caught by the most prying ear without, or any noise from without
being heard by those within, except when some devil of a cart runs
away in Duke-street, and goes clattering up that accursed back
street behind.
"Sit down, sit down, Mr. Tims!" said Lord Ashborough, without
raising his eyes, which were running over a paper he had taken from
the drawer. "Sit down, sit down, I say!"
Mr. Tims did sit down, and then, drawing forth some papers from
a blue bag, which he held in his hand, he began quietly to put them
in order, while Lord Ashborough read on.
"Here it is, any lord," replied the lawyer "and I have examined it
again most carefully. There is not a chink for a fly to break through.
There is not a word about redemption from beginning to end. The
money must be paid for the term of your lordship's natural life."
Mr. Tims was never astonished at any thing that a great man--
_i.e_. a rich man--did or said, unless he perceived that it was
intended to astonish him, and then he was very much astonished
indeed, as in duty bound. It was wonderful, too, with what facility he
could agree in every thing a rich man said, and exclaim, "Very like
an ousel!" as dexterously as Polonius, or a sick-nurse, though he had
been declaring the same question "very like a whale!" the moment
before. Nor was he ever at a loss for reasons in support of the new
opinion implanted by his patrons. In short, he seemed to have in his
head, all ticketed and ready for use, a store of arguments, moral,
legal, and philosophical, in favor of every thing that could be done,
said, or thought, by the wealthy or the powerful. In the present
instance, he saw that Lord Ashborough put the matter as one not
quite decided in his own mind; but he saw also, that his mind had
such a leaning to the new view of the matter, as would make him
very much obliged to any one who would push it over to that side
altogether.
"I think your lordship is quite right," replied Mr. Tims. "You had
every right to refuse to redeem if you thought fit; but, at the same
time, you can always permit the redemption if you like; and it might
indeed look more generous--though, as I said before, you had every
right to refuse. Yet perhaps, after all, my lord--"
"Tush! Do not after all me, sir," cried Lord Ashborough, with some
degree of impatience, which led Mr. Tims to suspect that there was
some latent motive for this change of opinion, which his lordship felt
a difficulty in explaining: and which he, Mr. Tims, resolved at a
proper time to extract by the most delicate process he could devise.
"The means, sir," added Lord Ashborough; "the means are the things
to be attended to, not the pitiful balancing of one perhaps against
another."
"Oh! my lord, the means are very easy," replied Tims, rubbing his
hands. "You have nothing to do but to send word down that your
lordship is ready to accept, and any one will advance the means to
Sir ----"
Mr. Tims ventured not a word, for he saw that his patron had
made himself angry with the attempt to arrange something in his
own mind which would not be arranged; and taking up his papers,
one by one, as slowly as he decently could, he deposited them in
their blue bag, and then stole quietly toward the door. Lord
Ashborough was still walking up and down, and he suffered him to
pass the inner door without taking any notice; but, as he was
pushing open the red baize door beyond, the nobleman's voice was
heard exclaiming, "Stay, stay! Mr. Tims, come here!" The lawyer
glided quietly back into the room, where Lord Ashborough was still
standing in the middle of the floor, gazing on the beautiful and
instructive spots on the Turkey carpet.. His reverie, however, was
over in a moment, and he again pointed to the chair which the
lawyer had before occupied, bidding him sit down, while he himself
took possession of the seat on the other side of the table; and,
leaning his elbow on the oak, and his cheek upon his hand, he went
on in the attitude and manner of one who is beginning a long
conversation. The commencement, however, was precisely similar to
the former one, which had proved so short. "Do you know, Mr.
Tims," he said, "I have some idea of permitting the redemption? I
am afraid we have made a mistake in refusing it;" but then he
added, a moment after--"for the particular purpose I propose."
Mr. Tims was as silent as a mouse, for he saw that he was near
dangerous ground; and, at that moment, six-and-eightpence would
hardly have induced him to say a word--at least if it went farther
than, "Exactly so, my lord!"
The matter was still a difficult one for Lord Ashborough to get
over; for it is wonderful how easily men can persuade themselves
that the evil they wish to commit is right; and yet how troublesome
they find even the attempt to persuade another that it is so,
although they know him to be as unscrupulous a personage as ever
lived or died unhung. Now Lord Ashborough himself had no very
high idea of the rigid morality of his friend Mr. Tims's principles, and
well knew that his interest would induce him to do any thing on
earth; and yet, strange to say, that though Lord Ashborough only
desired to indulge a gentlemanlike passion, which, under very slight
modifications, or rather disguises, is considered honorable and is
patronized by all sorts of people, yet he did not at all like to display,
even to the eyes of Mr. Tims, the real motive that was now
influencing him. As it was necessary, however, to do so to some one,
and he knew that he could not do so to any one whose virtue was
less ferocious than that of Mr. Tims, he drew his clenched fist, on
which his cheek was resting, half over his mouth, and went on.
"The fact is, you must know, Mr. Tims," he said, "this Sir Sidney
Delaware is my first cousin--but you knew that before. Well, we
were never very great friends, though he and my brother were; and
at college it used to be his pleasure to thwart many of my views and
purposes. There is not, perhaps, a prouder man living than he is,
and that intolerable pride, added to his insolent sarcasms, kept us
greatly asunder in our youth, and therefore you see he has really no
claim upon my friendship or affection in this business."
"None in the world! None in the world!" cried Tims. "Indeed, all I
wonder at is, that your lordship does not use the power you have to
annoy him!"
Lord Ashborough waved his hand. "Not at all, Mr. Tims! Not at
all!" he said. "Your intentions, I know, are good. But hear me. We
came in collision concerning the lady whom he afterward married,
and made a well bred beggar of. He had known her, and, it seems,
obtained promises from her before I became acquainted: and
though a transitory fancy for her took place in my own bosom"--and
Lord Ashborough turned deadly pale--"yet of course, when I heard
of my cousin's arrangements with her, I withdrew my claims,
without, as you say, exerting power that I may flatter myself--"
"You say very true, Mr. Tims," replied Lord Ashborough, with a
benign smile. "You say very true, indeed; and I do think myself, in
justice to society, bound to correct such insolence, though, perhaps,
I may not be inclined to carry the chastisement quite so far as
yourself."
"Nothing could be too severe for such a man!" cried Mr. Tims,
resolved to give his lordship space enough to manœuvre in.
"Nothing could be too severe!"
"Nay, nay, that is saying too much," said Lord Ashborough. "We
will neither hang him, Mr. Tims, nor burn him in the hand, if you
please," and he smiled again at his own moderation.
The lawyer shook his head. "I am afraid, my lord, if you had
permitted the redemption, the money would have been ready to the
minute," he said. "My uncle, I hear, was to have raised it for him;
and, as he was to have had a good commission, it would have been
prepared to the tick of the clock."
"And was your uncle to have lent the money himself, sir?"
demanded Lord Ashborough, with a mysterious smile of scorn. "Did
your uncle propose to give the money out of his own strongbox?"
"No, my lord, no!" replied Tims, eagerly; "no, no! He would not do
that without much higher interest than he was likely to have got.
Had he been the person, of course your lordship might have
commanded him; but it was to be raised from some gentleman
connected with Messrs. Steelyard and Wilkinson--a very respectable
law house, indeed!"
The lawyer started off his chair with unaffected astonishment, the
expression of which was, however, instantly mastered, and down he
sat again, pondering, as fast as he could, the probable results that
were to be obtained from this very unexpected discovery. Some
results he certainly saw Lord Ashborough was prepared to deduce;
and he knew that his only plan was to wait the development thereof,
assisting as much as in him lay, the parturition of his patron's
designs. But Lord Ashborough having spoken thus far, found very
little difficulty in proceeding.
"Not before you have got the amount!" exclaimed the lawyer, in
unutterable astonishment.
"Yes, sir, before I have got the amount," replied Lord Ashborough,
phlegmatically, "but not before I have got bills or notes of hand,
payable within a certain time, and with an expressed stipulation, that
unless those are duly paid, the annuity itself holds in full force."
"Ay; but if they be paid, my lord," cried Mr. Tims, "the annuity is
at an end; and then where is your lordship?"
"But can not we find means to stop their being paid, Mr. Tims?"
said Lord Ashborough, fixing his eyes steadily upon the lawyer. "In
all the intricate chambers of your brain, I say, is there no effectual
way you can discover to stop the supplies upon which this Delaware
may have been led to reckon, and render him unable to pay the sum
on the day his bills fall due? Remember, sir, your uncle is the agent,
as I am led to believe, between this person and my nephew. Harry
Beauchamp, forsooth, has too fine notions of delicacy to offer the
money in his own person; but he is the man from whom the money
is to come, and it has been for some weeks lodged in the hands of
Steelyard and Wilkinson, his solicitors, awaiting the result--that is to
say, the whole of it except ten thousand pounds in my hands, which
I have promised to sell out for him to-morrow, and pay into their
office. Are there no means, sir, for stopping the money?"
"Why, that were a great deal better still," said the lawyer. "The
only person he could send would be his servant, Harding, who owes
me the place; and who, between you and I, my lord, might find it
difficult to keep me from transporting him to Botany Bay, if I chose
it. He would doubtless be easily prevailed upon to stop the money
for a time, or altogether, if it could be shown him that he could get
clear off, and the matter would be settled forever."
There was a tone of familiarity growing upon the lawyer, as a
natural consequence of the edifying communion which he was
holding with his patron, that rather displeased and alarmed Lord
Ashborough, and he answered quickly, "You forget yourself, sir! Do
you suppose that I would instigate my nephew's servant to rob his
master?"
Mr. Peter Tims had perhaps forgot himself for the moment; but he
was one of those men that never forget themselves long; and, as
crouching was as natural to him as to a spaniel, he was instantly
again as full of humility and submission as he had been, previously
to the exposé which had morally sunk Lord Ashborough to a level
with Mr. Tims. "No, my lord, no!" he exclaimed eagerly; "far be it
from me to dream for one moment that your lordship would form
such an idea. All I meant was, that this servant might easily be
induced to delay the delivery of the money, on one pretext or
another, till it be too late; and if he abscond--which perchance he
might do, for his notions concerning property, either real or personal,
are not very clearly defined--your lordship could easily intend to
make it good to Mr. Beauchamp."
"I do not know what you propose that I should easily _intend_,
Mr. Tims," replied Lord Ashborough; "but I know that it would not
sound particularly well if this man were to abscond with the money,
and there were found upon his person any authorization from me to
delay discharging his trust to his master."
"Why, I fear not, my lord," answered the other, shaking his head;
"I fear not--he was five-and-thirty years a lawyer, my lord, and he is
devilish cautious. But I will tell you what I can do. I can direct him to
address all his letters, on London business, under cover to your
lordship, which will save postage--a great thing in his opinion--and,
as he holds a small share of my business still, I can open all the
answers. So that we will manage it some way."
"Why, my lord," replied Mr. Tims, in a low and humble tone, "even
suppose he is arrested, depend upon it, he will very easily find some
one to lend him the money on the Emberton estates, to take up the
bills he has given."
The earl's eye flashed, and the dark and bitter spirit in his heart
broke forth for the first time unrestrained. "Let me but have him in
prison!" he exclaimed; "let me but have him once in prison, and I
will so complicate my claims upon his pitiful inheritance, and so
wring his proud heart with degradations, that the beggar who
robbed me of my bride shall die as he has lived, in poverty and
disappointment!" and in the vehemence with which the long-
suppressed passion burst forth, he struck his hand upon the table,
till the ink-glasses danced in their stand.
Mr. Tims could understand envy, hatred, and malice, and all
uncharitableness; but he was cowed by such vehemence as that into
which the bare thought of seeing his detested rival in prison had
betrayed his noble patron. Feeling, too, that he himself was not at all
the sort of spirit to rule the whirlwind and direct the storm, he said a
few quiet words about preparing every thing, and waiting on his
lordship the next morning, and slunk away without more ado.
CHAPTER X.